Inserting and removing commas from integers in c++
<p>Very much a noob here, so it's best to assume I know nothing in any answers.</p>

<p>I've been writing a little app, and it's working well, but readability is a nightmare with my numbers.</p>

<p>Essentially, all I want to do is to add commas into the numbers displayed on the screen to make it easier to read. Is there a quick and easy way to do this?</p>

<p>I've been using stringstream to grab my numbers (I'm not sure why this is even suggested at this point, it was simply advised in the tutorial I worked through), such as(cropping out the irrelevent bits):</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;string&gt;
#include &lt;sstream&gt;
using namespace std;

int items;
string stringcheck;

...

    cout &lt;&lt; "Enter how many items you have: ";
        getline (cin, stringcheck);
        stringstream(stringcheck) &gt;&gt; items;

...

    cout &lt;&lt; "\nYou have " &lt;&lt; items &lt;&lt; " items.\n";
</code></pre>

<p>When that number is typed as something large, amongst everything else it becomes quite a headache to read.</p>

<p>Is there any quick and easy way to make it print "13,653,456" as opposed to "13653456" like it would right now (assuming that's what was input of course)?</p>

<p>Note: If it matters, I'm making this as a console application in Microsoft Visual C++ 2008 Express Edition.</p>
