Initialize references in C++
<p>If I want a pointer to point to another variable I make it do so by giving the address to the variable with &amp;. </p>

<pre><code>int foo = 10;
int *bar = &amp;foo;
</code></pre>

<p>Now If I follow the same logic as above and instead creates a reference type.</p>

<pre><code>int foo = 10;
int &amp;bar = &amp;foo; 
</code></pre>

<p>I would think this should work, but it doesn't. Why?</p>
