title: Cannot Convert from const int* to int*
body: <p>I'm trying to compile the following piece of code, but I'm getting a C2440 (visual studio) error. I've tried looking at other resources for help, but I can't find a good explanation. </p>
  
  <pre><code>int main()
  {
      int a = 100;
      SomeFunction(&amp;a);
  }
  
  void SomeFunction(const int* value)
  {
      //This line of code gives me the error. 
      int* variable = value;
  
      cout &lt;&lt; "Value is " &lt;&lt; *Variable &lt;&lt; " end" &lt;&lt; endl;
  }
  </code></pre>
  
  <p>I know I can solve this problem by using <code>int* variable = const_cast&lt;int*&gt; (value);</code>, but I still don't understand why the above code is causing a problem. </p>