title: foreach not recognized in C++
body: <p>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 errors. Here's the code: </p>
  
  <pre><code>   void DisplayWordCounts(Map&lt;int&gt; &amp; wordsCount) {
       foreach (string word in wordsCount) {
          cout &lt;&lt; left &lt;&lt; setw(15) &lt;&lt; word &lt;&lt; right &lt;&lt; setw(5)
          &lt;&lt; wordsCount[word] &lt;&lt; endl;
       }
  }
  </code></pre>
  
  <p>on the line starting with "foreach" I get the following errors:
  lesson4-macbeth/life.cpp:58: error: expected primary-expression before 'word'
  lesson4-macbeth/life.cpp:58: error: 'foreach' was not declared in this scope
  lesson4-macbeth/life.cpp:58: error: expected `;' before '{' token</p>
  
  <p>I guess foreach is not recognized. In that case, how can I go through a list of items from the Map class? </p>