c++ const_cast question
<pre><code>const int a = 1;
int *p = const_cast&lt;int*&gt;(&amp;a);
*p = 2;
cout &lt;&lt; “value a=”&lt;&lt; a &lt;&lt; endl;
cout &lt;&lt; “value *p=” &lt;&lt;*p &lt;&lt; endl;
cout &lt;&lt; “address a=” &lt;&lt;&amp;a &lt;&lt; endl;
cout &lt;&lt; “address p=” &lt;&lt;p &lt;&lt; endl;
</code></pre>

<p>output:</p>

<pre><code>value a=1
value *p=2
address a=0xbff1d48c
address p=0xbff1d48c
</code></pre>

<p>WHY???
why same addr ,diff value?
confused.
thank you!</p>
