I want to have my output as 0a instead of a within one line of cout code, how should I do that. many thanks
#include <iostream>
int main () {
uint8_t n = 10;
std::cout <<std::hex<< + static_cast<uint8_t>(n)<<'\n';
return 0;
}
I want to have my output as 0a instead of a within one line of cout code, how should I do that. many thanks
#include <iostream>
int main () {
uint8_t n = 10;
std::cout <<std::hex<< + static_cast<uint8_t>(n)<<'\n';
return 0;
}