Printing addresses of variables
<p>When I run this code:</p>

<pre><code>uint8_t stackVar = 0;
void* ptr = &amp;stackVar;
uint8_t&amp; ref = reinterpret_cast&lt;uint8_t&amp;&gt;(ptr);
std::cout &lt;&lt; (void*)&amp;ref &lt;&lt; std::endl;
std::cout &lt;&lt; ptr &lt;&lt; std::endl;
std::cout &lt;&lt; (void*)&amp;stackVar &lt;&lt; std::endl;
</code></pre>

<p>I get this output:</p>

<pre><code>0x22fe30
0x22fe3f
0x22fe3f
</code></pre>

<p>At least in my estimation I should get the same number for all three of these statements.  What is going on here?</p>