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> m = {{1, "Geeks"},
- {2, "For"}, {3, "Geeks"}};
- cout << m[1] << endl;
- cout << m.at(2);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment