+ 4
What the difference between structure and class ?
4 Answers
+ 9
In addition to dear hatsi's post, I'd like to point out to another area that class has advantage over struct. I fetched this one from StackOverflow. You can't use a struct as a template's parameter.
For example,
template < class T > .... is allowed
template < struct T > ..... is not
+ 3
structure is not an OOPs concept but class is an OOPs concept
+ 1
Member's of class are are private by default while struct members are public by default.
When deriving a struct from a class/struct, default access-specifier for a base class/struct is public. And when deriving a class, default access specifier is private.