title: How to convert int and std::string to char*?
body: <p>How to convert int and std::string to char* ?</p>
  
  <p>I'm trying to do this :</p>
  
  <pre><code>int a = 1;
  std::string b = "str";
  char* x = a + b;
  </code></pre>
  
  <p>I don't want something like this:</p>
  
  <pre><code>std::stringstream ss;
  std::string str2char;
  ss &lt;&lt; a;
  str2char = ss.str() + "str";
  std::vector&lt;char&gt; writable(str2char.size() + 1);
  std::copy(str2char.begin(), str2char.end(), writable.begin());
  x = &amp;writable[0];
  </code></pre>
  
  <p>How to deal with this, please.</p>