Can anyone please give me a brief explanation as to how this vector is suppose to work. (vector<Grocery Item*> gitems; )
Here are the classes...
class Inventory
{
protected:
vector<GroceryI tem*> gitems;
public:
void AddNewGrocery() ;
void DeleteGrocery() ;
void ModifyGrocery() ;
void ListAllItems();
};
//-----------------------------
class GroceryItem
{
protected:
string itemName;
float temPrice;
int qtyOnHand;
int qtyPurchased;
public:
virtual void PrintGrocery()= 0;
};
GroceryItem is a class that holds common properties of other classes such as.. class Bread, class Jam, class Cereal... all with their own special properties as well...
Is this suppose to be a link list??? or something... I don't understand how the vector is suppose to work...
Thanks!
Here are the classes...
class Inventory
{
protected:
vector<GroceryI tem*> gitems;
public:
void AddNewGrocery() ;
void DeleteGrocery() ;
void ModifyGrocery() ;
void ListAllItems();
};
//-----------------------------
class GroceryItem
{
protected:
string itemName;
float temPrice;
int qtyOnHand;
int qtyPurchased;
public:
virtual void PrintGrocery()= 0;
};
GroceryItem is a class that holds common properties of other classes such as.. class Bread, class Jam, class Cereal... all with their own special properties as well...
Is this suppose to be a link list??? or something... I don't understand how the vector is suppose to work...
Thanks!
Comment