[ create a new paste ] login | about

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

xtofl - C++, pasted on Aug 11:
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <iostream>

using namespace std;

struct A { A(){ cout << "A()\n"; } ~A() { cout << "~A();\n"; } };

int main() {
  cout << "start\n";
  {
    A a;
  }
  cout << "out of local scope\n";
}


Output:
1
2
3
4
start
A()
~A();
out of local scope


Create a new paste based on this one


Comments: