fork download
  1. #include <iostream>
  2. #include <map>
  3. #include <string>
  4.  
  5. int main() {
  6. std::map<std::string, int> m = {
  7. {"one", 1},
  8. {"two", 2}};
  9.  
  10. std::cout << m["one"] << std::endl;
  11. }
Success #stdin #stdout 0s 3476KB
stdin
Standard input is empty
stdout
1