Skip to content

Instantly share code, notes, and snippets.

@satojkovic
Created June 28, 2013 08:40
Show Gist options
  • Save satojkovic/5883357 to your computer and use it in GitHub Desktop.
Save satojkovic/5883357 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <map>
using namespace std;
int main()
{
map<string, int> m;
m["hello"] = 100;
if( m.count("hello") == 1 ) {
cout << "m has 'hello'" << endl;
}
else {
cout << "m doesn't have 'hello'" << endl;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment