name.h
来自「Beginning Visual C++ 6源码。Wrox。」· C头文件 代码 · 共 26 行
H
26 行
// Name.h - Definition of the Name class
#ifndef NAME_H
#define NAME_H
// Class defining a person's name
class Name
{
public:
Name(); // Default constructor
Name(const char* pFirst, const char* pSecond); // Constructor
char* getName(char* pName) const; // Get the complete name
int getNameLength() const; // Get the complete name length
// Comparison operators for names
bool operator<(const Name& name) const;
bool operator==(const Name& name) const;
bool operator>(const Name& name) const;
private:
char* pFirstname;
char* pSurname;
};
#endif //NAME_H
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?