c/c++课的作业合集,都是很简单的文件。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

23 lines
648 B

//
// Created by lensferno on 2022/3/30.
//
#include <sstream>
#include "Staff.h"
Staff::Staff(const std::string &name, char sex, const std::string &phone, const Date &birthday) :
name(name), sex(sex), phone(phone),
birthday(birthday) {}
Staff::Staff(const Staff &staff) : name(staff.name), sex(staff.sex), phone(staff.phone), birthday(staff.birthday) {}
std::string Staff::toString() {
std::stringstream output;
output
<< "name: " << name << '\n'
<< "sex: " << sex << '\n'
<< "phone: " << phone << '\n'
<< "birthday: " << birthday.toString();
return output.str();
}