comparing unsigned char to hex value

I want to compare a unsigned char that has the hex value: 0x01 to 0x01. How would i do that? Tried googling with no success.
Last edited on
1
2
unsigned char c = 0x01;
if(c == 0x01) cout << "yay";
Topic archived. No new replies allowed.