class
are private
by default.
* Members of a class defined with the keywords struct
or union
are public
by default.
*
*/
class X {
int a; // X::a is private by default
};
struct S {
int a; // S::a is public by default
};
#endif //_ACCESS_SPECIFIERS_HPP__