Difference between class & structure


Difference between class & structure ????

Class - default access specifier as "private"
Structure - default access specifier as "public"

Apart from above is there any difference between above two structure ?
http://msdn.microsoft.com/en-us/library/aa664471(v=vs.71).aspx

I'm not sure how much of that is still valid. I just tried making destructors and parameterless constructors in VS2010 and this worked fine.

Here's one difference for sure:
Structures inherit publicly be default and classes inherit privately.

For other stuff try this:
http://lmgtfy.com/?q=struct+vs+class
Last edited on
Topic archived. No new replies allowed.