I need to format my output like "%5d\n", where all the output would be integers. Is there anyway to do this using cout?
For example, the output would look like:
Code:14640 6565
This is a discussion on output format within the C++ Programming forums, part of the General Programming Boards category; I need to format my output like "%5d\n", where all the output would be integers. Is there anyway to do ...
I need to format my output like "%5d\n", where all the output would be integers. Is there anyway to do this using cout?
For example, the output would look like:
Code:14640 6565
Last edited by Beowolf; 12-02-2007 at 10:27 PM.
"I don't fail - I succeed at finding things that don't work"
Website Promotion Techniques @AbstractPromotion.com
look at setw modifier
If I have eight hours for cutting wood, I spend six sharpening my axe.
im sure this will help http://www.arachnoid.com/cpptutor/student3.html