cout: number base, justification, and format flags : cout scientific « Console « C++






cout: number base, justification, and format flags

cout: number base, justification, and format flags


#include <iostream>
using namespace std;
int main()
{
  cout.setf(ios::hex, ios::basefield);
  cout << 300;  
  return 0;
}


           
       








Related examples in the same category

1.cout: change formatscout: change formats
2.Sets both the uppercase and scientific flags and clears the uppercase flag
3.Displays the value 100 with the showpos and showpoint flags turned on