title: How to create a function with return type map<>?
body: <p>Fairly straightforward question. I have a map that I wish to initialize by calling a function like so:</p>
  
  <p><code>map&lt;string, int&gt; myMap;</code></p>
  
  <p><code>myMap = initMap( &amp;myMap );</code></p>
  
  <pre><code>map&lt;string, int&gt; initMap( map&lt;string, int&gt; *theMap )
  {
      /* do stuff... */
  </code></pre>
  
  <p>However, the compiler is moaning. What's the solution to this?  </p>
  
  <p><strong>EDIT 1:</strong></p>
  
  <p>I'm sorry, but I screwed up. The code was correctly written with <code>*theMap</code>, but when I posted the question, I failed to notice that I had omitted the <code>*</code>. So to answer the comment, the error message I get is:</p>
  
  <p><code>1&gt;Roman_Numerals.cpp(21): error C2143: syntax error : missing ';' before '&lt;'</code></p>
  
  <p>which is thrown at</p>
  
  <p><code>map&lt;char, int&gt; initMap( map&lt;char, int&gt; *numerals );</code></p>
  
  <p>using VC++ 2010 Express and the same error again when I define the function.</p>