The following code does not compile:
struct MyStruct {int i;};
class MyClass : MyStruct {public: int i;};
int main() {
MyClass c1;
c1.MyStruct::i = 44;
return 0;
}
The default access specifier for a class is private.
Tuesday, November 16, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment