class FoodSeller:public Person//这个类要弄到animalfood和money类,创建对象来实施相应操作
class Zoo
{
public:
Zoo(int =0,int=0,int=0,int=0);
~Zoo();
bool judgeStatus();
private:
FoodSeller people;
AnimalEnclosure ae[3];
};
#endif
Zoo::Zoo(int p, int c, int b, int d)
:people(p, c, b,0)//此处为什么说没有办法进去,这里错误
{
}
{
FoodSeller(int,int,int,int);//调用FoodSeller的函数构造函数。注意形参列表的对应
~FoodSeller();
void setSellingPea(int);
void setSellingCar(int);
void setSellingBan(int);
void setSellingFood();
int getPeaAmount()const;
int getCarAmount()const;
int getBanAmount()const;
protected:
AnimalFood peanuts;//创建AnimalFood的具体卖的对象
AnimalFood carrots;
AnimalFood bananas;
private:
Money earnings;
};
#endif
十分紧急求帮忙