DIFF.BLOG
New
Following
Discover
Jobs
More
Suggest a blog
Upvotes plugin
Report bug
Contact
About
Sign up  
[C++]How to use erase of std map correctly
1
·
王爱国
·
May 10, 2018, 5:11 p.m.
Summary
Origin Text: http://www.cnblogs.com/graphics/archive/2010/07/05/1771110.html #include <iostream> #include <map> #include <string> using namespace std ; int main(void) { map<int, string> m ; m.insert(pair<int, string>(1, "abc")) ; m.insert(pair<int, string>(2, "def")) ; m.insert(pair<int, string>(3, "def")) ; m.insert(pair<int, string>(4, "ghi")) ; map<int, string>::iterator itor ; // Print m map<int, string>::const_iterator citor ; for (citor = m.begin(); citor != m.end(); ++citor) { cout << cit...
Read full post on dawnarc.com →
Submit
AUTHOR
RECENT POSTS FROM THE AUTHOR