title: How to convert string to char * in C++?
body: <p>How can I convert a <code>string</code> in to <code>char *</code> I was using the following method, but it doesn't work. </p>
  
  <p>At runtime it gives me the following error: </p>
  
  <blockquote>
    <p>Run-Time Check Failure #3 - The variable 'url' is being used without
    being initialized.</p>
  </blockquote>
  
  <p>eventhough I have initialized it as shown in the code bellow. Can you please show me with an example?</p>
  
  <pre><code>    char* url;
      sup = "news"
      sup="http://www."+sup+"yahoo.com";
      strcpy(url, sup.c_str());
  </code></pre>
  
  <p>I am using Microsoft Visual Studio 2010, C++ in console</p>