title: In C++, make an alias const
body: <p>I'm a beginner to C++ and I have a question that I want to make sure...I've done pretty of searching online. </p>
  
  <p>Let say I have a class call A and it has a function called Afunction. The function looks like:</p>
  
  <pre><code>// this is pseudocode
  void Afunction (const A&amp; a)
  {
   a.something = a.something +1;
  }
  </code></pre>
  
  <p>My understanding is we have an "pointer-like" thing called 'a' and it's an alias to whatever we pass in. Here we only make sure the alias itself is const, but no guarantee that the value to which it points at won't be changed. In fact, I'm changing it..and I don't get no error.</p>
  
  <p>So my question is, how can I make sure the values that the alias is point to can't be changed? It's much easier to be done if it's pointer other than alias...</p>
  
  <p>Thanks in advance.</p>