point.cpp

来自「清华大学郑莉《C++语言程序设计》课件、C++教材源代码、实验参考程序全集」· C++ 代码 · 共 23 行

CPP
23
字号
// Point.cpp
#include<iostream>
#include "Point.h"
using namespace std;
Point::Point()
{   X=Y=0;
     cout<<"Default Constructor called."<<endl;
}
Point::Point(int xx,int yy)
{   X=xx;
     Y=yy;
     cout<< "Constructor called."<<endl;
}
Point::~Point()
{
       cout<<"Destructor called."<<endl;
}
void Point::Move(int x,int y)
{
        X=x;
        Y=y;
}

⌨️ 快捷键说明

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