title: c++ passing by const reference
body: <p>In the following program body cosists of a vector of pointers. Points is a struct of x,y,z coordinates and a point_id. I believe as body is passed by const reference, the following step should produce an error. BUt the program is running without any problem. Can you please explain me why is this. </p>
  
  <pre><code>void readOutFile(const Body&amp; body, int n){
  
      ....
  
      body.bp[0]-&gt;points.push_back(Point_id(p,i));
  }
  </code></pre>