Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <map>
- using namespace std;
- int main() {
- map<int, string> m1;
- map<int, string> m2 = {{1, "Geeks"},
- {2, "For"}, {3, "Geeks"}};
- map<int, string> m3;
- m3[0] = "c";
- m3[1] = "+";
- m3[2] = "+";
- for (auto p : m2)
- cout << p.first << " " << p.second << endl;
- cout << m2[1] << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment