Thank you all for your attempts to help me. Again, I apologize for the gross errors in my original code sketch. Although I asked for folks to see past them they seem to be a point of great...
Type: Posts; User: mtbusche
Thank you all for your attempts to help me. Again, I apologize for the gross errors in my original code sketch. Although I asked for folks to see past them they seem to be a point of great...
Mats,
Uhmm...yeah...I definitely don't want to store the lists by value. Should be more like:
class FruitStore
{
private:
vector<vector<Fruit&>&> shelves;
Suppose you have classes Apple, Orange and Pear that all inherit from a base class Fruit. And suppose your software has modules that work with vector<Apple>, vector<Orange> and vector<Pear>. Now...