#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 回答
- 0 關(guān)注
- 1245 瀏覽
添加回答
舉報(bào)
0/150
提交
取消