point.h

来自「const是C++中很常用而且很灵活的一种变量,学好使用const对变成很有帮助」· C头文件 代码 · 共 34 行

H
34
字号
// Point.h: interface for the Point class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_POINT_H__65115002_CDB1_4697_BCCB_006F8126FFCE__INCLUDED_)
#define AFX_POINT_H__65115002_CDB1_4697_BCCB_006F8126FFCE__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <math.h>

class Point  
{
public:
	Point(int _x,int _y);	
	virtual ~Point();
	int x,y;
	float cal_dist(Point& ) const;	
	float cal_dist(Point&) ;

	int get_y() const;
	int get_x() const;
	void set_x(int) ;
	void set_y(int) ;

// 仅供测试
	const  int center_x;
	const  int center_y;
	const static Point center;
};

#endif // !defined(AFX_POINT_H__65115002_CDB1_4697_BCCB_006F8126FFCE__INCLUDED_)

⌨️ 快捷键说明

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