Friday 5 April 2013

What are the differences between a C++ struct and C++ class?

What are the differences between a C++ struct and C++ class?

The default member and base class access specifiers are different.
The C++ struct has all the features of the class. The only differences are that a struct defaults to public member access and public base class inheritance, and a class defaults to the private access specifier and private base class inheritance.



Blog Author: Vijay Kumar

No comments:

Post a Comment