fork download
  1. #include<iostream>
  2. using namespace std;
  3. class A{
  4. public:
  5. A(){cout<<"A"<<endl;}
  6. ~A(){cout<<"~A"<<endl;}
  7. A f(){cout<<"F"<<endl; A b; return b;}
  8. };
  9. int main(){
  10. A a,b;
  11. b=a.f();
  12. }
Success #stdin #stdout 0.02s 2724KB
stdin
Standard input is empty
stdout
A
A
F
A
~A
~A
~A