PS

This code is not complete but it serves its purpose and works.

I'm getting an error saying that I'm getting a construction error.

Expected Primary-expression before int.(That would be were it link FrozenPizza::FrozenPizza(blah blah) : FrozenFood(blahblah) {}

Again this is an example of the code, the read code is..


#include <cstdlib>
#include <iostream>

using namespace std;

class Food {
public: //Make private..humph..check them all an figure out the small diffs
int Money;
int Cost;
int Quantity;
int Size;
Food(int ACost, int AQuantity, int ASize);
void virtual Buy ();
int GetMoney();
int GetCost();
};

class Dairy : public Food {
public:
string Animal;
int Expiration;
public:
Dairy(int ACost, int AQuantity, int ASize, string AAnimal,
int AExpiration);
};

class Milk : public Dairy {
public:
int Gallons;
string CartonType;
string Color;
public:
Milk(int ACost, int AQuantity, int ASize, string AAnimal,
int AExpiration, int AGallons, string ACartonType, string AColor);
};

Food::Food(int ACost, int AQuantity, int ASize) {
Cost = ACost;
Quantity = AQuantity;
Size = ASize;
}

Dairy:Grinairy(int ACost, int AQuantity, int ASize, string AAnimal,int AExpiration) : Food(int ACost,int AQuantity,int ASize){
Animal = AAnimal;
Expiration = AExpiration;

I get big errors mentioned above from this line, I tried to mimic the code in the previous post.

PS. I have no idea what an inherited class exactly is used for, nor do I know how, But i'm trying to get a feel for how to write it when I fine out more about the purpose. Sorry my posts kinda suck.