Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<vector>
- using namespace std;
- class Worker {
- string first_name;
- string second_name;
- public:
- Worker(string first_name, string second_name) {
- this->first_name = first_name;
- this->second_name = second_name;
- }
- string GetFirstName() const {
- return this->first_name;
- }
- string GetSecondName() const {
- return this->second_name;
- }
- };
- ostream& operator<<(ostream& out, const Worker& worker) {
- return out << worker.GetFirstName() << ' ' << worker.GetSecondName();
- }
- void Execute() {
- vector<Worker> workers;
- //read from file
- while (true) {
- int choose;
- cout << "Choose action\n";
- cout << "1. Print workers\n";
- cin >> choose;
- switch (choose) {
- case 1:
- //print workers
- break;
- default:
- cout << "Wrong choose\n";
- }
- }
- }
- int main() {
- Execute();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement