title: C++ converting an int to a string
body: <p>I know this is extremely basic but I'm very new to C++ and can't seem to find an answer.  I'm simply trying to convert a few integers to strings.  This method works: </p>
  
  <pre><code>int a = 10;
  stringstream ss;
  ss &lt;&lt; a;
  string str = ss.str();
  </code></pre>
  
  <p>but when I need to convert the second and third ones like this:</p>
  
  <pre><code>int b = 13;
  stringstream ss;
  ss &lt;&lt; a;
  string str2 = ss.str();
  
  int c = 15;
  stringstream ss;
  ss &lt;&lt; b;
  string str3 = ss.str();
  </code></pre>
  
  <p>I get this error:</p>
  
  <pre><code>'std::stringstream ss' previously declared here
  </code></pre>
  
  <p>Do I need to somehow close stringstream?  I've noticed that if I put them far away from each other in my code the compiler doesn't mind but that doesn't seem like something I should do.  Does anyone have suggestions?</p>