Printing an integer with internal spacing and plus sign, internal, showpos - C++ File Stream

C++ examples for File Stream:cout

Description

Printing an integer with internal spacing and plus sign, internal, showpos

Demo Code

#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;
}

Result


Related Tutorials