📄 copy.cpp
字号:
// copy.cpp: implementation of the copy class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "test.h"
#include "copy.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
copy::copy(int a,int b)
{
x=a;
y=b;//age=1;加
}
copy::copy(const copy &p)//拷贝构造函数
{
x=2*p.x;
y=2*p.y;
}
copy::~copy()
{
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -