Paste number 153933: c++

Paste number 153933: c++
Pasted by: phf
When:4 years, 2 months ago
Share:Tweet this! | http://paste.lisp.org/+3ARX
Channel:None
Paste contents:
Raw Source | XML | Display As
#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.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.