I\'m looking for a way to convert hex(hexadecimal) to dec(decimal) easily. I found an easy way to do this like :
hex
dec
Use std::hex manipulator:
#include #include int main() { int x; std::cin >> std::hex >> x; std::cout << x << std::endl; return 0; }