各位大神能帮小白找下错吗?我已经内流满面了
#include <iostream>
#include <string>
using namespace std;
class Date{
private :
int day,moon,year;
public:
Date (int d=1,int m=1,int y=2019){day=d;moon=m;year=y;}
Date (Date &di);
~Date ();
int getd(){return day;}
int getm(){return moon;}
int gety(){return year;}
void show ();
};
Date::Date(Date &di){
day=di.day;
moon=di.moon;
year=di.year;}
class People{
private:
Date d;
int no,n;
string s;
public:
People (int num,int nom,string st,Date db);
People (People &p);
void set (int nom,int num,string st);
void show ();
};People::People (People &p):no(p.no),n(p.n),s(p.s),d(p.d)
{
}
void People::set (int nom,int num,string st)
{
no=nom;
n=num;
s=st;
}
People::People(int nom,int num,string st,Date db):no(nom),n(num),s(st),d(db)
{
}
inline void People ::show (){
cout<<no<<" "<<n<<" "<<s<<endl;
}
int main(){
Date da(1,1,2019);
People pe(0,0,0,da);
pe.set (101,4229,"cxv");
pe.show();
People pe1=pe;
pe1.show ();
return 0;}
非技术区