RSS Feed for This PostCurrent Article

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.

Trackback URL

Post a Comment