Paste number 153933: | c++ |
Pasted by: | phf |
When: | 7 years, 9 months ago |
Share: | Tweet this! | http://paste.lisp.org/+3ARX |
Channel: | None |
Paste contents: |
#include<iostream>
#include<map>
#include<string>
using namespace std;
class Foo {
public:
string tag;
Foo(string tag) {
this->tag = tag;
cout<<tag<<": i live"<<endl;
}
~Foo() {
cout<<tag<<": i die"<<endl;
}
};
int main() {
map<string, Foo> foo;
foo.insert(make_pair("a", Foo("a")));
foo.clear();
cout<<"end."<<endl;
}
This paste has no annotations.