C++ examples for File Stream:cout
Print integer 40000 left justified in a 15-digit field
#include <iomanip> #include <iostream> #include <limits> using namespace std; int main(int argc, const char *argv[]) { std::cout << std::setw(15) << std::left << 40000 << std::endl; return 0;/* w w w . j av a 2 s . c om*/ }