Answers for "how to initialize map in c++"

C++
6

how to initialize map in c++

std::map<std::string,std::string> my_map = {
  {"key1","value1"},
  {"key2","value2"}
};
Posted by: Guest on July-14-2020
5

initialize map c++

std::map<std::string, int> mapOfMarks = {
		{"Riti",2},
		{"Jack",4}
};
Posted by: Guest on May-08-2020

Browse Popular Code Answers by Language