Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- enum Sex
- {
- Male,
- Female,
- };
- struct Worker {
- bool Education;
- union {
- struct {
- string fio; //ФИО
- string post;//Должность
- int experience;//Стаж
- Sex sex;
- string title;
- string special;
- } InfoUseEdu;
- struct {
- string fio; //ФИО
- string post;//Должность
- int experience;//Стаж
- Sex sex;
- } InfoNoEdu;
- }info;
- } w1, w2, w3;
- int main()
- {
- w1.info.InfoUseEdu.fio = "Мурзак Даниил Сергеввич";
- w1.info.InfoUseEdu.sex = Male,
- w1.info.InfoUseEdu.post = "Junior developer";
- w1.info.InfoUseEdu.experience = 1;
- w1.Education = true;
- w1.info.InfoUseEdu.special = "Прикладная информатика в здравоохранении";
- w1.info.InfoUseEdu.title = "ТГПУ. им. л.н Толстого ";
- w2.info.InfoUseEdu.fio = "Малинин Геннадий Валеревич";
- w2.info.InfoUseEdu.sex = Male,
- w2.info.InfoUseEdu.post = "Middle developer";
- w2.info.InfoUseEdu.experience = 5;
- w2.Education = true;
- w2.info.InfoUseEdu.special = "Прикладная информатика в здравоохранении";
- w2.info.InfoUseEdu.title = "ТГПУ. им. л.н Толстого ";
- w3.info.InfoNoEdu.fio = "Голубина Светлана Анатольевна";
- w3.info.InfoNoEdu.sex = Female,
- w3.info.InfoNoEdu.post = "Секретарь";
- w3.info.InfoNoEdu.experience = 2;
- w3.Education = false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement