eople类型的对象?Peopleperson[3]={People("0","0","0",date[0],"0"),People("0","0","0",date[1],"0"),People("0","0","0",date[2],"0")};?//设置这3个对象的各类信息?for(i=0;i<3;i++)?{?person[i].setName(); person[i].setNumber(); person[i].setSex(); person[i].setId(); date[i].setDate(); spaceA=getchar();?}?//输出这3个对象的各类信息?for(i=0;i<3;i++)?{ person[i].showPeople(); date[i].showDate();?}*/?//测试==重载?Dated1(0,0,0);?Peoplep1("lizhibo","01","male",d1,"123456");?Peoplep2("wangyusen","02","male",d1,"123");Peoplep3("zhouhao","03","male",d1,"123456");?test(p1,p2);?test(p1,p3);?//测试=重载?cout<<"Before="<<endl;?p1.showPeople();?p1=p3;?cout<<"After="<<endl;?p1.showPeople();?return0;}运行结果1.2.直接使用对象.函数的形式可以成功调用函数:使用基类指针后出现错误,只能调用基类的成员函数:将基类的成员函数设置成虚函数之后,成功实现调取各个派生类的成员函数:其中在使用Vehicle类型指针指向Motorcycle类型的对象时会出现错误:将Vehicle按照虚基类继承,问题解决。3.