For example, the previous definition of ItemInfo could be placed in item.H.
Here is the full contents of item.H:
#ifndef _ITEM_H
#define _ITEM_H
#include <iostream>
#include <string>
using namespace std;
class ItemInfo {
public:
ItemInfo(double p, string c);
double getPrice();
string getColor();
virtual void display();
private:
double price;
string color;
};
#endif/* _ITEM_H */