Uses ios member functions: setf, ios::hex, ios::basefield : cout fill « Console « C++






Uses ios member functions: setf, ios::hex, ios::basefield

Uses ios member functions: setf, ios::hex, ios::basefield
 

#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
  cout.setf(ios::hex, ios::basefield);
  cout << 12300 << "\n";
  cout.fill('?');
  cout.width(10);
  cout << 232343.0;
  return 0;
}

           
         
  








Related examples in the same category

1.cout fill(): Specify the fill charactercout fill(): Specify the fill character
2.Using fill() and width for string output
3.Using fill() and width setting for string output
4.Using fill() to set filler for extra space
5.Set fill() for string output