C#小白这两道题怎么做??求答案!
2个回答
展开全部
1
class Point
{
privite:
double x;
double y;
public:
void point()
{
x = 0;y = 0;
}
void point(double xx,double yy)
{
x = xx; y = yy;
}
double GetX()
{
return x;
}
double GetY()
{
return y;
}
}
main()
{Point a = new point(1,2); double x1 = a.GetX();double y1 = a.GetY(); }
class Point
{
privite:
double x;
double y;
public:
void point()
{
x = 0;y = 0;
}
void point(double xx,double yy)
{
x = xx; y = yy;
}
double GetX()
{
return x;
}
double GetY()
{
return y;
}
}
main()
{Point a = new point(1,2); double x1 = a.GetX();double y1 = a.GetY(); }
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询