president.cpp

来自「设计模式实例: 远行(ProtoType)模式源代码」· C++ 代码 · 共 28 行

CPP
28
字号
// President.cpp: implementation of the President class.
//
//////////////////////////////////////////////////////////////////////

#include "President.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

President::President(char* pp)
{
	strcpy( m_Party, pp );  
}

President::~President()
{
}

void President::PartyLine()
{
	cout << m_Party<< ": speak no evil" << endl; 
}

Officer* President::Clone()
{
	return new President(*this);
}

⌨️ 快捷键说明

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