23 lines
472 B
C++

#ifndef EXAMPLE10_EMPLOYEE_H
#define EXAMPLE10_EMPLOYEE_H
#include <iostream>
class Employee {
private:
std::string name;
public:
Employee(std::string name) : name(name) {
std::cout << "Employee::constructor" << std::endl;
}
virtual ~Employee() {
std::cout << "Employee::destructor" << std::endl;
}
virtual const std::string& toString() const {
return name;
};
};
#endif //EXAMPLE10_EMPLOYEE_H