personalinfoimp.cpp
来自「data+structures+using+c的源码」· C++ 代码 · 共 32 行
CPP
32 行
#include <iostream>
#include <string>
#include "personalInfo.h"
using namespace std;
void personalInfoType::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 personalInfoType::printpersonalInfo() const
{
name.print();
cout<<"'s date of birth is ";
bDay.printDate();
cout<<endl;
cout<<"and personal ID is "<<personID;
}
personalInfoType::personalInfoType(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 + -
显示快捷键?