Show the base in hexadecimal : hexadecimal « Data Types « C++ Tutorial






#include <iostream>
#include <iomanip>
#include <string>
#include <sstream>

using namespace std;

int main( ) {
  stringstream ss;
  ss << showbase << hex << 16; // Show the base in hexadecimal
  cout << ss.str( ) << endl;
}
0x10








2.15.hexadecimal
2.15.1.Show the base in hexadecimal
2.15.2.Convert hex number to integer
2.15.3.Fill space with ?