题目详情:
发布时间:2020-06-21 10:14:01
[单项选择]有以下类定义
classPoint{
public:
Point(int x=0,int y=0){_x=x;_y=y;}
void Move (int xOff,int yOff
{_x +=xOff;_y+yOff}
void Print( ) const
{cout<<’’(’’<<_x<<’’,’’<<_y<<’’)’’<<endl;}
private:
int_x_y;
};
下列语句中会发生编译错误的是【 】
A. Pointpt;pt;Print();
B. const Point pt;pt.Print();
C. Pointpt;pt.Move(1,2);
D. const Point pt;pt.Move(1,2);
更多"有以下类定义
classPoint{
public:
"的相关试题: