temp->birthPlace; cout << \请输入更改:\; cin >> temp->birthDay; break; case 51: cout << \生日原为:\ << temp->birthDay; cout << \请输入更改:\; cin >> temp->birthDay; break; case 52: cout << \性别原为:\ << temp->sex; cout << \请输入更改:\; cin >> temp->sex; while (temp->sex != \&&temp->sex != \&& temp->sex != \男\&&temp->sex != \女\){ cout << \输入错误,性别必须为male、female、男或女!\\n请重新输入:\; cin >> temp->sex; } break; case 53: cout << \身高原为:\ << temp->height; cout << \请输入更改:\; cin >> temp->height; break; case 54: cout << \年龄原为:\ << temp->age; cout << \请输入更改:\; cin >> temp->age; break; case 55: cout << \学历原为:\ << temp->education; cout << \请输入更改:\; cin >> temp->education; break; case 56: cout << \工作原为:\ << temp->job; cout << \请输入更改:\; cin >> temp->job; break; default:; } cout << \修改成功!\; } end:cout<<\按ESC键返回菜单\; for (;;){ if (_getch() == 27) break; } rend:return true; } void FamilySystem::display(Member *r, int n){ string blank=\; for (int i = 0; i != n; ++i) blank += \; cout << blank<
<< p->birthDay << \ << p->sex << \ << p->height << \ << p->age << \ << p->job << \ << p->education << \ << p->father << endl; } } //计算这一代成员的儿女的人数 //若这一代都没有儿女,则退出 int jubge = 0; for (auto p : genely){ if (p != nullptr){ if (p->pson != nullptr) ++jubge; } } if (jubge == 0) break; //找到下一代的成员,即这一代的儿女 vector