cin>>time;
outle<<time<<" ";
}
void output()
{
cout<<"类型:"<<type<<" "<<"牌号:"<<num2<<" "<<"制
造公司:"<<company<<" "<<"购买时间:"<<time<<endl;
}
};
int che::a=5;
class car:public virtual che//继承,小轿车类:油耗/公里,基本维护费用,
总体费用
{
int totle;
double petrolp;//油量
static double bsexpense;//基本维护费
public:
void ccar()
{ outle<<"小轿车"<< " ";}
void inputc1()
{
cout<<"输入耗油量/公里:";
cin>>petrolp;
cout<<endl;
outle<<petrolp<<" ";
}
void outputT()
{
cout<<"该月维护费用:"<<a*petrolp+bsexpense<<endl;
outle<<a*petrolp+bsexpense<<'\n';
}
};
double car::bsexpense=1000;
class truck:public virtual che
{
int totle;
double petrolp;
static double bsexpense;
public:
void ttruck()
{ outle<<"卡车"<<" ";}
void inputc1()
{
cout<<"输入耗油量/公里:";