In my the cs106b book we use the expression \"foreach\" to go through a list of words in a Map. I implemented the code and banged my head against the wall facing mysterious erro
foreach doesn't exist in C++.
In the latest version of C++ which is only just released in some of the latest compilers, you can use "Range-based for-loop" .. find it on this page: http://en.wikipedia.org/wiki/C%2B%2B0x
I doubt though that your compiler supports that. So, maybe stick with a for loop for now.