2-1 Point类的定义
2016-09-21 19:31
134 查看
#include<iostream> using namespace std; class point { private: int x;int y; public: void setpoint( ) { x=10;y=11; } void showpoint() { cout<<"("<<x<<","<<y<<")"<<endl; } }; int main() { class point t; t.setpoint(); t.showpoint(); return 0; }
相关文章推荐
- 2-1 Point类的定义
- Point类的定义
- sdut 2-1 Point类的定义
- 2-1 Point类的定义
- 编写程序定义Point类,有数据成员X,Y,为其定义友元函数实现重载+。
- 2-1 Point类的定义
- sdut 2-1 Point类的定义
- 2-1 Point类的定义
- 2-1 Point类的定义
- C++ 2-1 Point类的定义
- 2-1 Point类的定义
- 2-1 Point类的定义
- 2-1 Point类的定义
- 2668-Point类的定义
- (C++)类与对象2-1 Point类的定义
- 2-1 Point类的定义
- 2-1 Point类的定义
- 2-1 Point类的定义
- 2-1 Point类的定义
- 2-1 Point类的定义