gibsjose / cpp-cheat-sheet

C++ Syntax, Data Structures, and Algorithms Cheat Sheet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

map iterator example bug

dlwalter opened this issue · comments

commented

On the following section for map: https://github.com/gibsjose/cpp-cheat-sheet/blob/master/Data%20Structures%20and%20Algorithms.md#15-map-stdmap-and-stdunordered_map

//iterator
for(std::map<int>::iterator it = m.begin(); it != m.end(); it++) {

I believe it should be

//iterator
for(std::map<std::string, std::string>::iterator it = m.begin(); it != m.end(); it++) {

Very true, thanks