Can member functions of an object acces private members of local a object variable of the same nature? And if yes why? (see example…a.x)
float vector3d::scalar(vector3d a){ return (x*a.x + y*a.y + z*a.z); // here we can acces a.x even if x is a private // member of a (vector3d)….my guess as scalar is a // member function of vector3d it can acces private // members of local vector3d variables } here we can acces a.x even if x… Read More Can member functions of an object acces private members of local a object variable of the same nature? And if yes why? (see example…a.x)