comparing unsigned char to hex value

Mar 23, 2011 at 5:14am
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 Mar 23, 2011 at 5:15am
Mar 23, 2011 at 5:47am
1
2
unsigned char c = 0x01;
if(c == 0x01) cout << "yay";
Topic archived. No new replies allowed.