读书人

求好手帮忙解答

发布时间: 2012-09-03 09:48:39 作者: rapoo

求高手帮忙解答啊
Example




1234567891011121314151617181920
// map::begin/end
#include <iostream>
#include <map>
using namespace std;

int main ()
{
map<char,int> mymap;
map<char,int>::iterator it;

mymap['b'] = 100;
mymap['a'] = 200;
mymap['c'] = 300;

// show content:
for ( it=mymap.begin() ; it != mymap.end(); it++ )
cout << (*it).first << " => " << (*it).second << endl;

return 0;
}
这个begin该怎么解释啊???还有那个for循环也看不懂啊

[解决办法]

探讨

那是从b开始吗??

读书人网 >C++

热点推荐