Typo in Appendix A: Intermediate C++ Review
Opened this issue · 0 comments
zixin96 commented
// Get an iterator to the element with the key 2
std::map<int, std::string> iter = months.find(2); // SHOULD BE std::map<int, std::string>::iterator iter = months.find(2);
if (iter != months.end()) // This is only true if found
{
std::cout << iter->first << std::endl; // Outputs 2
std::cout << iter->second << std::endl; // Outputs February
}
I find this in my kindle version of the book, however, I can't seem to find page number anywhere.
Thanks for the great book!