point.h
来自「C++&datastructure书籍源码,以前外教提供现在与大家共享」· C头文件 代码 · 共 29 行
H
29 行
#ifndef _POINT_H
#define _POINT_H
#include <string>
using namespace std;
struct Point
{
Point();
Point(double px, double py);
string tostring() const;
double distanceFrom(const Point& p) const;
double x;
double y;
};
bool operator == (const Point& lhs, const Point& rhs);
bool operator != (const Point& lhs, const Point& rhs);
bool operator < (const Point& lhs, const Point& rhs);
bool operator > (const Point& lhs, const Point& rhs);
bool operator <= (const Point& lhs, const Point& rhs);
bool operator >= (const Point& lhs, const Point& rhs);
ostream& operator << (ostream& os, const Point& p);
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?