title: How do I fix a "No instance of overloaded function" error with cin.getline?
body: <pre><code>string add_text()
  {
      const int string_size(30);
      string add_string;
      cin.getline (add_string,string_size,'\n');
      return add_string;
  }
  </code></pre>
  
  <p>When I compile the program with the function above, I get an error. Note that I am using <code>using namespace std;</code> earlier in the program. If it helps I am using Code Blocks and have also tried compiling the program using the Visual Studio 11 Professional Beta.</p>
  
  <p><strong>The Error:</strong></p>
  
  <pre><code>C:\Users\Jonathan\Documents\Code_Blocks\test_12\main.cpp|32|error: no matching function for call to 'std::basic_istream&lt;char, std::char_traits&lt;char&gt; ::getline(std::string&amp;, const int&amp;, char)'|
  </code></pre>
  
  <p>Any help with this issue will be greatly appreciated, thanks in advance!</p>