⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 point.cpp

📁 MFC经典教材的源代码 C++经典语法与应用
💻 CPP
字号:
#include <iostream.h>
class Point
{
public:
	int x;
	int y;
/*	void init()
	{
		x=0;
		y=0;
	}*/
	Point()
	{
		x=0;
		y=0;
	}
	Point(int a,int b)
	{
		x=a;
		y=b;
	}
	~Point()
	{
	}
	void output()
	{
		cout<<x<<endl<<y<<endl;
	}
	void output(int x,int y)
	{
		this->x=x;
		this->y=y;
	}
};

void main()
{
	Point pt(3,3);
	pt.output(5,5);
//	pt.init();
	//pt.x=5;
	//pt.y=5;
//	cout<<pt.x<<endl<<pt.y<<endl;
	pt.output();
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -