Bu sayfadaki yazılar
Sayfanın metni
Sayfa 141
// RECT Sınıfı class RECT { public: RECT(); RECT(RECT *rctRect); RECT(POINT2D *p2dPoint1, POINT2D *p2dPoint2); RECT(int x1Val, int y1Val, int x2Val, int y2Val); ~RECT(); int getX1(); int getY1(); int getX2(); int getY2(); void setX1(int newX1); void setY1(int newY1); void setX2(int newX2); void setY2(int newY2); private: int x1; int y1; int x2; int y2; };
void RECT::RECT() { // Boş } void RECT::RECT(RECT *rctRect) { x1 = rctRect->x1; y1 = rctRect->y1; x2 = rctRect->x2; y2 = rctRect->y2; } void RECT::RECT(POINT2D *p2dPoint1, POINT2D *p2dPoint2) { x1 = p2dPoint1->getX(); y1 = p2dPoint1->getY(); x2 = p2dPoint2->getX(); y2 = p2dPoint2->getY(); } void RECT::RECT(int x1Val, int y1Val, int x2Val, int y2Val) { x1 = x1Val; y1 = y1Val; x2 = x2Val; y2 = y2Val; } void RECT::~RECT() {
Klavyeyle gezinmek için ← ve → tuşları.
Sayfa 140
/** * Icerikler */ #include #include #include
/** * Tanımlar */ #define CHAR03 0x03 #define INT_VIDEO 0x10 #define VGA13 0x13
/** * Sınıflar */
// POINT2D Sınıfı class POINT2D { public: POINT2D(); POINT2D(POINT2D *p2dPoint); POINT2D(int xVal, int yVal); ~POINT2D(); int getX(); int getY(); void setX(int newX); void setY(int newY); private: int x; int y; };
void POINT2D::POINT2D() { // Boş } void POINT2D::POINT2D(POINT2D *p2dPoint) { x = p2dPoint->x; y = p2dPoint->y; } void POINT2D::POINT2D(int xVal, int yVal) { x = xVal; y = yVal; } void POINT2D::~POINT2D() { // Boş } int POINT2D::getX() { return x; } int POINT2D::getY() { return y; } void POINT2D::setX(int newX) { x = newX; } void POINT2D::setY(int newY) { y = newY; }