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 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?