title: Easiest way to convert int to string in C++
body: <p>What is the easiest way to convert from <code>int</code> to equivalent <code>string</code> in C++.  I am aware of two methods. Is there any easier way?</p>
  
  <p>(1)</p>
  
  <pre><code>int a = 10;
  char *intStr = itoa(a);
  string str = string(intStr);
  </code></pre>
  
  <p>(2)</p>
  
  <pre><code>int a = 10;
  stringstream ss;
  ss &lt;&lt; a;
  string str = ss.str();
  </code></pre>