cout.setf(ios::hex, ios::basefield); : cout fill « Development « C++ Tutorial






#include <iostream>
#include <iomanip>
using namespace std;

int main()
{
  cout.setf(ios::hex, ios::basefield);
  cout << 100 << "\n";  // 100 in hex

  cout.fill('?');
  cout.width(10);
  cout << 2343.0;

  return 0;
}
64
??????2343








5.5.cout fill
5.5.1.fill('$')
5.5.2.cout.setf(ios::hex, ios::basefield);