Think Different
Saturday, 26 July 2014
[C++] The difference between class and struct
class X {
int a; // X::a is private by default
};
struct S {
int a; // S::a is public by default
};
[note]: the variable in union is also public by default.
Ref.
Working Draft, Standard for Programming
Language C++
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment