how to get commas into numbers make 1000 look like 1,000

i need to know what code i can use to insert commas in the right places the numbers never go about 5000 but i need commas to be present whenever they are needed so i don't need commas for anything 999 or less I am really new to this C++ and really need help Please and thank you for any help
Well an easy way would be to use stringstream. You wouldn't be able to use the return value for anything useful other than displaying the info however.
How do i do that?
the file name that I'm importing the number from an infile is called amount
Topic archived. No new replies allowed.