Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef __EMPLOYEE_H__
- #define __EMPLOYEE_H__
- # include <string>
- #include <iostream>
- #include <sstream>
- #include <stdio.h>
- using namespace std;
- class Employee{
- public:
- string name;
- string Position;
- int Age;
- Employee(string new_name = "Undefined", string new_pos = "Undefined", int new_Age = 0)
- {
- name = new_name;
- Position = new_pos;
- Age = new_Age;
- }
- ~Employee() { };
- string Show()
- {
- stringstream s;
- s<< "name: " << this->name << ", position: " << this->Position << ", age: " << this->Age;
- return s.str();
- }
- friend ostream& operator << (ostream& o, const Employee& x)
- {
- return o << "name: " << x.name << ", position: " << x.Position << ", age: " << x.Age;
- }
- };
- #endif /* __EMPLOYEE_H__ */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement