Structures vs classes

I would like to know what is the difference in usage of structures and classes in c++..i mean given some of their similarities,when do we use structures and when classes and why?
There is no real difference except for this:
Class have their standard access modifier set to private.
Structures have their standard access modifier set to public.

Practically, we use structures to structurize our data and we use classes as containers of both data and data members.
This can be done the other way around though, since they have the same functionality.
Last edited on
Topic archived. No new replies allowed.