class twopoint{
protected:
double x,y;
public:
twopoint(double i,double j):x(i),y(j){
}
void setX(double NewX) {
x=NewX;
}
void setY(double NewY){
y=NewY;
}
double getX()const{return x;}
double getY()const{return y;}
};
最后两行的 double getX()const{return x;},double getY()const{return y;},那个const有什么作用的,书本没提到。。