How to convert a C++ string to a char*?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/347949/convert-stdstring-to-const-char-or-char">Convert std::string to const char* or char*</a>  </p>
</blockquote>



<p>Simple question but I'm new to C++. How do I convert a string to a <code>char *</code> (I read a string from <code>cin</code> then I have a function that operates on <code>char[]</code> so need to get a <code>char *</code>)? Thanks.</p>
