[ create a new paste ] login | about

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

aaronla - C++, pasted on Oct 21:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <iostream>
#include <iomanip>
using namespace std;

struct S{
  ~S(){
    cout << "goodbye cruel world!" << endl;
  }
};

int main()
{
  S destroy_me;
  destroy_me.~S();
  cout << "end of main" << endl;
}  


Output:
1
2
3
goodbye cruel world!
end of main
goodbye cruel world!


Create a new paste based on this one


Comments: