title: C++ char * to string
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2564052/how-to-copy-char-into-a-string-and-vice-versa">how to copy char * into a string and vice-versa</a>  </p>
  </blockquote>
  
  
  
  <p>I have to pass a value into a method that required a char *</p>
  
  <pre><code>MyMethod(char * parameter)
  {
      // code
  }
  </code></pre>
  
  <p>However, the parameter I need to feed it is currently a std::string. How do I convert the std::string to a char *?</p>
  
  <pre><code>std::string myStringParameter = //whatever
  
  char * myCharParameter = //Convert here somehow
  
  MyMethod(myCharParameter);
  </code></pre>