c**********e 发帖数: 2007 | 1 typedef std::map MapType;
MapType theMap;
Referring to the code sample above, which one of the following blocks of
code displays the string contents of the entire map theMap?
a) MapType::iterator it = theMap.first();
while(it!= theMap.end()) std::cout << it;
b) MapType::iterator it = theMap.begin();
while(it!= theMap.end()) std::cout << theMap[it];
c) MapType::iterator it = theMap.begin();
while(it!= theMap.end()) std::cout << (*it++).second;
d) MapType::iterator it = theMap |
h**6 发帖数: 4160 | |
s*********t 发帖数: 1663 | 3 怎么A和D一样那
【在 c**********e 的大作中提到】 : typedef std::map MapType; : MapType theMap; : Referring to the code sample above, which one of the following blocks of : code displays the string contents of the entire map theMap? : a) MapType::iterator it = theMap.first(); : while(it!= theMap.end()) std::cout << it; : b) MapType::iterator it = theMap.begin(); : while(it!= theMap.end()) std::cout << theMap[it]; : c) MapType::iterator it = theMap.begin(); : while(it!= theMap.end()) std::cout << (*it++).second;
|
c**********e 发帖数: 2007 | 4 You need a pair of new glasses. :)
【在 s*********t 的大作中提到】 : 怎么A和D一样那
|
s*********t 发帖数: 1663 | 5 oh shoot....
【在 c**********e 的大作中提到】 : You need a pair of new glasses. :)
|