fork download
  1. #include <iostream>
  2. #include <map>
  3.  
  4. int main ()
  5. {
  6. std::map<char,int> mymap;
  7.  
  8. mymap['b'] = 100;
  9. mymap['a'] = 200;
  10. mymap['c'] = 300;
  11.  
  12.  
  13. auto it = mymap.find('d');
  14. std::cout << it->first << ":" << it->second;
  15.  
  16. return 0;
  17. }
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
:0