<p>in C++ I have two chars holding hex values e.g.:</p>

<pre><code>char t = 0x4;
char q = 0x4;
</code></pre>

<p>How would i compare if the two values held in the char are the same?? I tried</p>

<pre><code>if (t == q) // should give me true
</code></pre>

<p>but no, any help, thanks!</p>

Ah, I found the solution:
```
```
if (t & q)
```
```