initialize map c++ code example
Example 1: how to initialize map in c++
std::map my_map = {
{"key1","value1"},
{"key2","value2"}
};
Example 2: initialize map c++
std::map mapOfMarks = {
{"Riti",2},
{"Jack",4}
};
std::map my_map = {
{"key1","value1"},
{"key2","value2"}
};
std::map mapOfMarks = {
{"Riti",2},
{"Jack",4}
};