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"}};
- m.erase(2);
- m.erase(m.begin());
- for(auto i : m)
- cout << i.first << " " << i.second
- << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment