How to initialize a map in C++, please explain with example?
In C++14, following is the code segment:
#include 'bits/stdc++.h' using namespace std; main() { //for initialization map<int,int> new_map_created={{1,2}, {3,4}, {5,6}}; }
explain the scenario with example?
I want to get all the map values in c++? Please share sample code?