title: C++ Difference between const positioning
body: <p>I'm struggling to get my head around the differences between the various places you can put 'const' on a function declaration in c++.</p>
  
  <p>What is the difference between const at the beginning:</p>
  
  <pre><code>const int MyClass::showName(string id){
  ...
  }
  </code></pre>
  
  <p>And const at the end like:</p>
  
  <pre><code>int MyClass::showName(string id) const{
  ...
  }
  </code></pre>
  
  <p>Also, what is the result of having const both at the beginning and at the end like this:</p>
  
  <pre><code>const int MyClass::showName(string id) const{
  ...
  }
  </code></pre>