mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-11-22 21:52:31 +03:00
parent
5828962380
commit
6a11164757
@ -946,7 +946,7 @@ mymap.insert(pair<char,int>('Z',26));
|
|||||||
// To iterate
|
// To iterate
|
||||||
map<char,int>::iterator it;
|
map<char,int>::iterator it;
|
||||||
for (it=mymap.begin(); it!=mymap.end(); ++it)
|
for (it=mymap.begin(); it!=mymap.end(); ++it)
|
||||||
std::cout << it->first << "->" << it->second << std::cout;
|
std::cout << it->first << "->" << it->second << std::endl;
|
||||||
// Output:
|
// Output:
|
||||||
// A->1
|
// A->1
|
||||||
// Z->26
|
// Z->26
|
||||||
|
Loading…
Reference in New Issue
Block a user