#include <iostream>using namespace std;class CPoint{public: void Set(int x,int y); void Print();private: int x; int y;};void CPoint::Set(int x,int y){ x = x; y = y;}void CPoint::Print(){ cout<<"x="<<x<<",y="<<y<<endl;}void main(){ CPoint pt; pt.Set(10,20); pt.Print();}
1 回答
- 1 回答
- 0 关注
- 1223 浏览
添加回答
举报
0/150
提交
取消