lude<iostream>Р#include <string>Рusing namespace std;Рclass Date{Рpublic:Р Date(int y=0,int m=0,int d=0);Р void show();Рprivate:Р int year;Р int month;Р int day;Р};РDate::Date(int y,int m,int d)Р{Р year=y;Р month=m;Р day=d;Р}Рvoid Date::show()Р{Р cout<<"\n 出生所属年:"<<year;Р cout<<"\n 出生所属月:"<<month;Р cout<<"\n 出生所属日:"<<day;Р}Рclass Person{Рprivate:Р string name;Р string sex;Р string id;Р Date date1;Рpublic:Р Person(string name1,string sex1,string id1,int s1,int s2,int s3);Р void show();Р};РPerson::Person(string name1,string sex1,string id1,int s1,int s2,int s3):date1(s1,s2,s3)Р{Р name=name1;Р sex=sex1;Р id=id1;Р}Рvoid Person::show()Р{Р cout<<"\n 姓名:"<<name;Р cout<<"\n 性别:"<<sex;Р cout<<"\n 编号:"<<id;