title: violation of const variable using a pointer c++
body: <p>Why i am allowed to change a const value without errors?</p>
  
  <pre><code>void foo(long * a)
  {
      *a = 50;
  }
  
  int _tmain(int argc, _TCHAR* argv[])
  {
      const long a = 7; 
      const long * b = &amp;a;
  
      foo((long *)b);
      // now the value of a is 50
  }
  </code></pre>