[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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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