#include #include #include "Person.h" Person::Person(const std::string& id, const std::string &name, char sex, const std::string &identNumber, const Date &birthday) : id(id), name(name), sex(sex), identNumber(identNumber), birthday(birthday) {} Person::Person(const Person &person) : id(person.id), name(person.name), sex(person.sex), identNumber(person.identNumber), birthday(person.birthday) {} std::string Person::toString() { std::stringstream output; output << "编号:" << id << '\n' << "姓名:" << name << '\n' << "性别:" << sex << '\n' << "身份证号:" << identNumber << '\n' << "出生日期:" << birthday.toString() << '\n'; return output.str(); }