next up previous
Next: Formatting under ostream Up: iomethods Previous: Some istream methods: eof

Formatting output

Tables of output numbers are easier to read if the columns line up. Here we learn about controlling numeric output format with cout. It is possible, but clumsy. The ANSI C function printf is better and can be used in C++. We show how to use it as well.


Carleton DeTar 2007-10-31