Created
May 13, 2012 23:51
-
-
Save cammckinnon/2690831 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
class Base { | |
private: | |
class Child { | |
private: | |
int member; | |
Child(): member(6) {} | |
}; | |
public: | |
int getInnerPrivate() { | |
return Child().member; | |
} | |
}; | |
int main() { | |
std::cout<<Base().getInnerPrivate(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment