how to declare map values in c++ code example
Example 1: initialize map c++
std::map<std::string, int> mapOfMarks = {
{"Riti",2},
{"Jack",4}
};
Example 2: map in cpp
#include <map>
int main(){
//new map
std::map <int,int> myMap;
myMap[0] = 1;
myMap[1] = 2;
myMap[2] = 3;
myMap[3] = 4;
}