title: C++ const : how come the compiler doesn't give a warning/error
body: <p>Really simple question about C++ constness.</p>
  
  <p>So I was reading this <a href="https://stackoverflow.com/questions/1143262/what-is-the-difference-between-const-int-const-int-const-int-const">post</a>, then I tried out this code:</p>
  
  <pre><code>int some_num = 5;
  const int* some_num_ptr = &amp;some_num;
  </code></pre>
  
  <p>How come the compiler doesn't give an error or at least a warning?</p>
  
  <p>The way I read the statement above, it says:</p>
  
  <pre><code>Create a pointer that points to a constant integer
  </code></pre>
  
  <p>But some_num is not a constant integer--it's just an int.</p>