求教
#include<iostream>
#include<string>
using namespace std;
class birthday
{
public:
birthday(int a,int b,int c);
birthday(){}
birthday(birthday &a){
this->day=a.day;
this->year=a.year;
this->month=a.month;
}
private:
int day;
int year;
int month;
};
class people
{
public:
people(int a,string m,string b,int c,birthday &xd):birth(xd),name(m),sex(b),num(a),id(c)
{
}
people(){}
people( people& other) : num(other.num), name(other.name), sex(other.sex), id(other.id), birth(other.birth) {}
private:
int num;
string name;
string sex;
int id;
birthday birth;
};
birthday::birthday(int a,int b,int c)
{
day=a;
month=b;
year=c;
}
int main()
{
cout<<" num name sex id birth"<<endl;
int a;
string b;
int c,d,m,y;
cin>>a>>b>>c>>d>>m>>y;
birthday me(d,m,y);
people wo(a,m,b,c,me);
}
no matching function for call to 'people::people(int&, int&, std::__cxx11::string&, int&, birthday&)'这个代码的错误不会改