#include<iostream>
using namespace std;
class Point
{
private:
double x;
double y;
public:
Point(double xx=0,double yy=0):x(xx),y(yy){}
void setPoint(double xx,double yy)
{
x=xx;
y=yy;
}
double getx()
{
return x;
}
double gety()
{
return y;
}
void shuchu()
{
cout<<x<<" "<<y<<endl;
}
};
int main()
{
Point a(2,4);
a.shuchu();
a.setPoint(4,5);
a.shuchu();
}*/
using namespace std;
class Point
{
private:
double x;
double y;
public:
Point(double xx=0,double yy=0):x(xx),y(yy){}
void setPoint(double xx,double yy)
{
x=xx;
y=yy;
}
double getx()
{
return x;
}
double gety()
{
return y;
}
void shuchu()
{
cout<<x<<" "<<y<<endl;
}
};
int main()
{
Point a(2,4);
a.shuchu();
a.setPoint(4,5);
a.shuchu();
}*/
版权声明:本文为Little_boy_z原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。