ex04.cpp
来自「VC深入详解code.rar」· C++ 代码 · 共 36 行
CPP
36 行
#include <iostream.h>
class point
{
public:
int x;
int y;
point()
{
x=0;
y=0;
}
point(int a,int b)
{
x=a;
y=b;
}
void output()
{
cout<<x<<endl<<y<<endl;
}
void input(int x,int y)
{
//x=x;
//y=y;
this->x=x;
this->y=y;
}
};
void main()
{
point pt(5,5);
pt.input(10,10);
pt.output();
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?