读书人

为啥总是提示未定义字符year求教

发布时间: 2012-11-10 10:48:50 作者: rapoo

为什么总是提示未定义字符year,求教
class motor
{
public:
motor(int);
virtual ~motor(){cout<<"motor destruction!"<<endl;}
virtual int gettime(){return time;}
private:
int time;
};
motor::motor(int year):time(year){cout<<"motor instruction!"<<endl;}


class car:public motor
{
public:
car(BAND band);
virtual ~car(){cout<<"car destruction!"<<endl;}
virtual void kong(){cout<<"hong hong hong!"<<endl;}
virtual BAND getband(){return itband;}
private:
BAND itband;
};
car::car(BAND band):motor(year),itband(band){cout<<"car instruction!";}//此行的year处总提示“未定义字符year”

[解决办法]
car的构造函数里面并没有year呀

读书人网 >C++

热点推荐