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