[ create a new paste ] login | about

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

C++, pasted on Apr 8:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <iostream>

using namespace std;

class A
{
  public:
  A() { cout << "hello from A" << endl; } 
  ~A() { cout << "by from A" << endl; } 
};

A a;

int main()
{
  cout << "hello from main" << endl;
}


Output:
1
2
3
hello from A
hello from main
by from A


Create a new paste based on this one


Comments: