ccc_empl.h
来自「BigC++的源码」· C头文件 代码 · 共 46 行
H
46 行
#ifndef CCC_EMPL_H#define CCC_EMPL_H#include <string>using namespace std;/** A basic employee class that is used in many examples in the book "Computing Concepts with C++ Essentials"*/class Employee{public: /** Constructs an employee with empty name and no salary. */ Employee(); /** Constructs an employee with a given name and salary. @param employee_name the employee name @param initial_salary the initial salary */ Employee(string employee_name, double initial_salary); /** Sets the salary of this employee. @param new_salary the new salary value */ void set_salary(double new_salary); /** Gets the salary of this employee. @return the current salary */ double get_salary() const; /** Gets the name of this employee. @return the employee name */ string get_name() const;private: string name; double salary;};#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?