title: Convert std::string to char* when string has nulls in middle
body: <pre><code>char* convert()
  {    
      std::string data = &quot;stack\0over\0flow&quot;;
      return data.c_str();
  }
  </code></pre>
  <p>This will return pointer and upon building the string from it on the caller it will have <strong>stack</strong> instead of complete string. Is there a workaround for this with out changing input and return types in c++ 11?
  I want to rebuild the entire string on the caller side from char*.</p>