getline in istream and getline in basic_string
<pre><code>string text;
getline(text.c_str(),256);
</code></pre>

<p>1) I am getting an error "error: no matching function for call to 'getline(const char*, int)"
What's wrong in the above since <code>text.c_str()</code> also returns a pointer to array of characters. </p>

<p>If I write like this</p>

<pre><code>char text[256]
cin.getline(text, 256 ,'\n'); 
</code></pre>

<p>it works fine. What's the difference between cin.getline and getline?</p>

<p>2) How come </p>

<pre><code>text string;
getline(cin,text,'\n') 
</code></pre>

<p>accepts the whole line as the input. Where is the pointer to array of characters in this one?</p>
