title: Deep copy std::string::c_str() to char *
body: <p>Currently I have a complex function that myself and our team are not wanting to refactor to utilize std::string and it takes a char* which is modified. How would I properly make a deep-copy of string::c_str() into a char*? I am <strong>not</strong> looking to modify the string's internally stored char*.</p>
  
  <pre><code>char *cstr = string.c_str();
  </code></pre>
  
  <p>fails because c_str() is const.</p>