I've got 3 classes 2 subclasses that link to a main class. (electric tools, fuel tools connect to Core tools). What i've done is made a handler class(Hardware) from these classes which has a void display in it.
vector<Hardware> hardware_stock;
Hardware record;
record.read(cin);
hardware_stock.push_back(record);
for(vector<Hardware>::size_type i = 0; i!= hardware_stock.size(); ++i)
{
hardware_stock[i].display();
}
What i would like to know is how do I display just the entries for a specific class. Like i just want to display the electric tools class..(sorry if my question was written badly :x)