[ create a new paste ] login | about

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

C++, pasted on Feb 12:
1
2
3
4
5
6
7
8
9
10
11
12
13
#include<iostream>
using namespace std;
class A{
public:
A(){cout<<"A"<<endl;}
~A(){cout<<"~A"<<endl;}
A f(){cout<<"F"<<endl; A b; return b;}
};

int main(){
A a,b;
b=a.f();
}


Output:
1
2
3
4
5
6
7
8
A
A
F
A
~A
~A
~A
~A


Create a new paste based on this one


Comments: