Tag Archives: Hexadecimal

Another way to print hex value in C++

You can simply use the std::hex base format flag! This also works with oct and dec. #include <iostream> int main() { std::cout << "Value of 10 in hex: " << std::hex << 10 << std::endl; std::cout << "Value of 10 in dec: " << std::dec << 10 << std::endl; std::cout << "Value of 10 in […]

0