Mega Code Archive
Categories
/
C++ Tutorial
/
Data Types
Show the base in hexadecimal
#include
#include
#include
#include
using namespace std; int main( ) { stringstream ss; ss << showbase << hex << 16; // Show the base in hexadecimal cout << ss.str( ) << endl; } 0x10