📄 d-point.h
字号:
#ifndef __POINT_H__
#define __POINT_H__
struct CPoint
{
int x, y;
CPoint(const int xx = 0, const int yy = 0) : x(xx), y(yy) {}
CPoint(const CPoint& p) : x(p.x), y(p.y) {}
~CPoint() {}
CPoint& operator=(const CPoint& p)
{
x = p.x;
y = p.y;
return *this;
}
CPoint& operator+=(const CPoint& p)
{
x += p.x;
y += p.y;
return *this;
}
CPoint& operator*=(const float s)
{
float t1 = x * s, t2 = y * s;
x = int(t1); y = int(t2);
return *this;
}
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -