Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- map<string, int> myMap;
- myMap["one"] = 1;
- myMap["two"] = 2;
- myMap["three"] = 3;
- map<string, int>::iterator it = myMap.find("two");
- myMap.erase( it, myMap.end() );
- myMap.erase( myMap.end() );
- myMap.erase( myMap.end(), myMap.end() );
- if ( it != myMap.end() )
- myMap.erase( it );
- map<int,int> m;
- for (int i = 0; i < 5; ++i)
- m[i] = i;
- m.erase( m.find(1), m.find(4) );
- for (int i = 1; i <= 4; ++i )
- m.erase( m.find(i) );
- a.erase( q1, q2)
- a.erase(q)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement