title: C++ equivalent of .ToString()
body: <p>There must be an easy way to do this...  </p>
  
  <pre><code>// C# code
      for (int i = 0; i &lt; 20; i++)
          doSomething(i.ToString() + "_file.bmp");
  </code></pre>
  
  <p>I'm trying to do this in C++, but it turns out that the simplest things are the hardest to do in that language.  Mostly because there's a catch:  I'm restricted to a library that only takes <code>char*</code>'s as the parameter for the function this will eventually end up in, so I'm pretty much stuck playing with <code>char</code> arrays.  This is what I have so far:</p>
  
  <pre><code>char* path[12];
  for(int i = 0; i &lt; 20; i++)
  {
      sprintf(path[0],"%i_Card.bmp",i);
      cards[i] = new Card(i,path[0]);
  }
  </code></pre>
  
  <p>The problem is, this approach ends me up with one big, long, useless string.</p>
  
  <p>I must disclose that this is for a school assignment, but answering this question will not decide my grade, it will just make one aspect of the app a little easier.</p>