1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-06 23:06:49 +02:00

[c++/en] Fix newline error (#4176)

* Fix newline error

* use std::endl
This commit is contained in:
Alan Chang
2022-01-04 00:36:58 +08:00
committed by GitHub
parent 5828962380
commit 6a11164757

View File

@@ -946,7 +946,7 @@ mymap.insert(pair<char,int>('Z',26));
// To iterate
map<char,int>::iterator 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:
// A->1
// Z->26