code_junkie

Comparing Char which holds hex values C++

Nov 12th, 2011
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. char t = 0x4;
  2. char q = 0x4;
  3.  
  4. if (t == q) // should give me true
  5.  
  6. char t = 0x4;
  7. char q = 0x4;
  8. if(t == q)
  9. {
  10. //They are the same
  11. }
  12.  
  13. char t = 4;
  14. char q = 4;
  15. if(t == q)
  16. {
  17. //They are the same
  18. }
  19.  
  20. if (t & q)
Add Comment
Please, Sign In to add comment