[ create a new paste ] login | about

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

C++, pasted on Sep 1:
1
2
3
4
5
6
7
8
9
10
11
12
struct base {
   base() { cout << "*B"; }
   base(base const& b) { cout << "!B"; }
  ~base() { cout << "~B"; }
};

struct der : base {};

int main() {
   der d1;
   der d2(d1);
}


Output:
1
*B!B~B~B


Create a new paste based on this one


Comments: