C++ examples for File Stream:cout
Printing an integer with internal spacing and plus sign, internal, showpos
#include <iomanip> #include <iostream> int main(int argc, const char *argv[]) { // display value with internal spacing and plus sign std::cout << std::internal << std::showpos << std::setw(10) << 123 << std::endl;// ww w .j a va2s . c o m return 0; }