请问James老师,内联函数能作为类中的封装函数么
//如下示例 class Coordinate{ public: double getX(); void setX(_x); private: double X; }; inline double Coordinate::getX(){return X;} inline void Coordinate::setX(_x){return X;} int main(){ Coordinate coor; coor.setX(5); <=>? coor.X=5 cout<<coor.getX()<<endl; <=>? coor.X //X处在private }