C++ examples for File Stream:cout
Print 200 with and without a sign
#include <iomanip> #include <iostream> #include <limits> int main(int argc, const char *argv[]) { // w ww .j a v a 2 s. c o m std::cout << std::showpos << 200 << "\n" << std::noshowpos << 200 << std::endl; return 0; }