title: Why does a function declaration with a const argument allow calling of a function with a non-const argument?
body: <p>Take note of the following C++ code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  using std::cout;
  
  int foo (const int);
  
  int main ()
  {
     cout &lt;&lt; foo(3);
  }
  
  int foo (int a)
  {
     a++;
     return a;
  }
  </code></pre>
  
  <p>Notice that the prototype of <code>foo()</code> takes a <code>const int</code> and that the definition takes an <code>int</code>. This compile without any errors...</p>
  
  <p>Why are there no compilation errors?</p>