Skip to content

Instantly share code, notes, and snippets.

@jordanlewis
Created April 15, 2010 01:21
Show Gist options
  • Save jordanlewis/366571 to your computer and use it in GitHub Desktop.
Save jordanlewis/366571 to your computer and use it in GitHub Desktop.
class Inner
{
int x;
public:
Inner(int x);
};
class Outer
{
Inner inner;
public:
Outer();
};
Outer::Outer ()
{
this->inner = Inner(3);
}
Inner::Inner(int x)
{
this->x = x;
}
int main(int argc, char **argv)
{
Outer a = Outer();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment