cage.h
来自「这是一个dos版的应用程序」· C头文件 代码 · 共 38 行
H
38 行
// ***************************************************************
// cage version: 1.0 ? date: 12/03/2006
// -------------------------------------------------------------
// cage.h
// -------------------------------------------------------------
// Copyright (C) 2006 - All Rights Reserved
// ***************************************************************
//
// ***************************************************************
#include <iostream.h>
#include <string.h>
//----------------------------------------------------------------
#ifndef _CAGE_H_
#define _CAGE_H_
//----------------------------------------------------------------
class Cage{
public:
Cage();
Cage(int,char*);
void ChangeCount(int);
void ChangePet(char*);
int GetCount();
char* GetPetName();
~Cage();
private:
int n_Count;
char* s_PetName;
};
//----------------------------------------------------------------
inline void Cage::ChangeCount(int c){n_Count=c;}
inline void Cage::ChangePet(char* n){strcpy(s_PetName,n);}
inline char* Cage::GetPetName(){return s_PetName;}
inline int Cage::GetCount(){return n_Count;}
//-----------------------------------------------------------------
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?