首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

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

2012-11-10 
为什么总是提示未定义字符year,求教class motor{public:motor(int)virtual ~motor(){coutmotor destru

为什么总是提示未定义字符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呀

热点排行