Here's a little function I wrote originally in MFC to add commas for the 1,000s - this may help get you off on a start if you can adapt it (unless of course you are using MFC anyway).
[tt]CString Delimit(int i)
{
CString str;
str.Format("%d",i);
if (i < 1000) return str;
and if you just want to use #'s, use a floating point number, and just use the setprecision method of cout, and set it to the number of decimals you want The weevil of doooooooooom
-The eagle may soar, but the weasel never gets sucked up by a jet engine (Anonymous)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.