📄 name.h
字号:
// 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -