personalinfoimp.cpp
来自「C++编成数据结构与程序设计方法 D.S.Malk编著」· C++ 代码 · 共 31 行
CPP
31 行
#include <iostream>
#include <string>
#include "personalInfo.h"
using namespace std;
void personalInfo::setpersonalInfo(string first, string last,
int month, int day, int year, int ID)
{
name.setName(first, last);
bDay.setDate(month,day,year);
personID = ID;
}
void personalInfo::printpersonalInfo() const
{
name.print();
cout << "'s date of birth is ";
bDay.printDate();
cout << endl;
cout << "and personal ID is " << personID;
}
personalInfo::personalInfo(string first, string last, int month,
int day, int year, int ID)
: name(first, last), bDay(month, day, year)
{
personID = ID;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?