[ create a new paste ] login | about

Link: http://codepad.org/zleOhppG    [ raw code | output | fork ]

C++, pasted on Oct 24:
#include <iostream>

struct A
{
  A()
  {
    cout << "A" << endl;
  }
};
struct B
{
  A a;
  B()
  {
    cout << "B" << endl;
  }
};
int main()
{
  B b;
  return 0;
}


Output:
1
2
A
B


Create a new paste based on this one


Comments: