cout: set ios flags, ios::showpos, ios::showbase : cout setiosflags « Console « C++






cout: set ios flags, ios::showpos, ios::showbase

cout: set ios flags, ios::showpos, ios::showbase
#include <iostream>
#include <iomanip>
using namespace std;

int main()
{
  cout << setiosflags(ios::showpos);
  cout << setiosflags(ios::showbase);
  cout << 123 << " " << hex << 123;

  return 0;
}


           
       








Related examples in the same category

1.setiosflags(): set the format flags related to a streamsetiosflags(): set the format flags related to a stream
2.Use setiosflags(): ios::showpos, ios::scientific Use setiosflags(): ios::showpos, ios::scientific