How do I pass a string into a function?
<p>I am attempting to use an overloaded function to get a string.</p>

<pre><code>void get(char prompt[], int size,const std::string b = "")
{
    std::cout &lt;&lt; prompt &lt;&lt; ": ";  
    std::cin.get(b, size);  
    std::cin.ignore(10, '\n');  
}
</code></pre>

<p>Now I did just change the last argument from a character array to a string at the advice of another poster on this site, so I'm a little lost.  I'm getting error message at the '.' in between cin and get.  I've also tried cin.getline (I have no idea if there's a difference or what it is)</p>

<blockquote>
  <p>Error message : cannot convert parameter 1 from 'const std::string' to
  'char *'</p>
</blockquote>

<p>The error has a lot of other stuff, but I think that's the important bit.</p>
