All pastes #355359 Raw Edit

korCZis

public text v1 · immutable
·published 2007-02-14 13:02 UTC
rendered paste body
#include <iostream>
#include <map>
#include <string>

using namespace std;

typedef std::map<std::string,int> MojeMapa;
typedef std::pair<std::string,int> MujPar;


int main(int argc, char** argv)
{
	MojeMapa mapa;
	
	mapa.insert(MujPar("Hello World!",2));
	mapa.insert(MujPar("Hello others!",1));

	cout << "Hello world! = " <<  mapa["Hello World!"] << endl;
	cout << "Hello others! = " << mapa["Hello others!"] << endl;

	return 0;
};



// Console output

Hello world! = 2
Hello others! = 1