请各位大侠帮忙解释并调试,看错误在哪里?
// wo.cpp : Defines the entry point for the console application.一个父亲,黄皮肤,黑眼睛,可以说中国话,有音乐天赋,一个母亲//,白皮肤,蓝眼睛,可以说中国话和英语,有计算天赋,他们的儿子,黄皮肤,黑眼睛,可以说中国话和英语
//,有音乐天赋,计算天赋和体育天赋,一个男医生,黄皮肤,蓝眼睛,可以说中国话,有文学天赋,他将位以上父母和他们的儿子检查身体。
//。编程实现他们的继承关系和展示其各自的天赋
//.编程实现医生为该父母和男孩检查成为函数。
//
#include <iostream.h>
#include <string.h>
class human
{
protected:
char name[10];
char skin[10];
char eyes[10];
char language[10];
char ta[10];
public:
human(char *na="unknown",char *sk="unknown",char *ey="unknown",char *la="unknown",char *t="unknown")
{ strcpy(name,na);
strcpy(skin,sk);
strcpy(eyes,ey);
strcpy(language,la);
strcpy(ta,t);
}
virtual void speak()
{cout<<"humam 可以讲"<<language<<endl;}
void talante()
{cout<<"天赋"<<ta<<endl;}
char Getname()
{cout<<"name ="<<name<<endl;}
};
class father:virtual public human
{
public:
father(char *na="unknown",char *sk="unknown",char *ey="unknown",char *la="unknown",char *t="unknown")
{ strcpy(name,na);
strcpy(skin,sk);
strcpy(eyes,ey);
strcpy(language,la);
strcpy(ta,t);
}
virtual void speak()
{cout<<" father 可以讲"<<language<<endl;}
void talante()
{cout<<"天赋"<<ta<<endl;}
};
class mother:virtual public human
{
public:
mother(char *na="unknown",char *sk="unknown",char *ey="unknown",char *la="unknown",char *t="unknown")
{ strcpy(name,na);
strcpy(skin,sk);
strcpy(eyes,ey);
strcpy(language,la);
strcpy(ta,t);
}
void speak()
{cout<<" mother 可以讲"<<language<<endl;}
void talante()
{cout<<"mother 天赋"<<ta<<endl;}
};
class doctor:public human
{public:
doctor(char *na="unknown",char *sk="unknown",char *ey="unknown",char *la="unknown",char *t="unknown")
{ strcpy(name,na);
strcpy(skin,sk);
strcpy(eyes,ey);
strcpy(language,la);
strcpy(ta,t);
}
virtual void speak()
{cout<<" doctor 可以讲"<<language<<endl;}
void talante()
{cout<<" doctor 天赋"<<ta<<endl;}
void check()
{cout<<"check name="<<doctor::Getname()<<endl;}
};
class son:public father,public mother
{public:
son(char *na="unknown",char *sk="unknown",char *ey="unknown",char *la="unknown",char *t="unknown")
{ strcpy(name,na);
strcpy(skin,sk);
strcpy(eyes,ey);
strcpy(language,la);
strcpy(ta,t);
}
void speak()
{cout<<" son 可以讲"<<language<<endl;}
void talante()
{cout<<" son 天赋"<<ta<<endl;}
};
void main()
{father 1("yi","huang","bai","han","yinyue");
mother 2("er","bai","lan","hanying","ji");
doctor 3("san","huang","hei","han","wen");
son 4("si","huang","hei","hanying","yinjiti");
1. speak();
1.talante();
2.speak();
2.talante()
4.speak();
4. talante();
}