Skip to content

Instantly share code, notes, and snippets.

@yifu
Created September 18, 2012 15:10
Show Gist options
  • Save yifu/3743659 to your computer and use it in GitHub Desktop.
Save yifu/3743659 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <map>
#include <string>
using namespace std;
/******************************************************/
/** Purpose: verify the default value for int as ******/
/** a value in a map (value opposed to a key) ******/
/******************************************************/
int main()
{
std::map<std::string, int> test;
cout << "test[\"3423\"] = " << test["3423"] << endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment