#include"License.h"
#include<string>
class HuntingLicense:public License
{
public:
HuntingLicense(){};
HuntingLicense(string hunting,string fName,string mName,string lName,int theAge,int theId);
string getTheName()const;
void read(istream&in);
void print(ostream&out)const;
private:
string TheHunting;
};
inline HuntingLicense::HuntingLicense(string hunting,string fName,string mName,string lName,int theAge,int theId)
:License()
{
TheHunting=" ";
}
inline HuntingLicense::HuntingLicense(string hunting,string fName,string mName,string lName,int theAge,int theId)
:License(fName,mName,lName,theAge,theId)
{
TheHunting=hunting;
}
inline string HuntingLicense::getTheName()const
{
return TheHunting;
}
inline void HuntingLicense::read(istream&in)
{
cin>>TheHunting;
License::read(in);
}
inline void HuntingLicense::print(ostream&out)const
{
cout<<TheHunting;
License::print(out);
}
huntinglicense.h(15) : error C2084: function '__thiscall HuntingLicense::HuntingLicense(void)' already has a body
我不知道哪错了,知道的指点一下
[此贴子已经被作者于2007-6-24 14:55:06编辑过]