?? units.hpp
字號:
#ifndef UNITS_HPP
#define UNITS_HPP
// Unit classes to help make things more complicated. <:
// $Id: units.hpp 2.1 1995/10/24 15:52:51 tsurace Beta $
//
// Pos - position class
class Pos
{
public:
Pos(int x = 0, int y = 0) : _x(x), _y(y) {;};
// Default copy and assign should be just fine
const int X() const { return _x; };
const int Y() const { return _y; };
int & X() { return _x; };
int & Y() { return _y; };
protected:
int _x;
int _y;
};
// Size - size class
class Size
{
public:
Size(int width, int height): _width(width), _height(height) {;};
// Default assign/copy should be fine
virtual ~Size() {;};
int Height() const { return _height; };
int & Height() { return _height; };
int Width() const { return _width; };
int & Width() { return _width; };
private:
int _width;
int _height;
};
#endif // UNITS_HPP
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -