Skip to content

Instantly share code, notes, and snippets.

@cammckinnon
Created May 13, 2012 23:51
Show Gist options
  • Save cammckinnon/2690831 to your computer and use it in GitHub Desktop.
Save cammckinnon/2690831 to your computer and use it in GitHub Desktop.
#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