location.cpp

来自「《C++语言程序设计(第2版)》配套例题程序,不可多得」· C++ 代码 · 共 20 行

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

⌨️ 快捷键说明

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