Mega Code Archive
Categories
/
C++ Tutorial
/
Language Basics
Use explicit std
#include
int main() { int val; std::cout << "Enter a number: "; std::cin >> val; std::cout << "This is your number: "; std::cout << std::hex << val; return 0; } Enter a number: 1 This is your number: 1