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 fo
Yes, body
is constant. That means that no non-const member functions may be called, and no member variables be modified.
Neither is being done. The only member of body
used is body.bp[0]
, which is not changed either, but merely used to get at points
, which might or might not be constant...
Corrolary: Don't make data members public.