When I try to compile the following code, I get an error that says "error C2228: left of '.addObject' must have class/struct/union type."
shelf<fruitJuice> storeJuice();
for(ctr=0; ctr < 5; ctr++)
storeJuice.addObject(juices[ctr]);
shelf is a template class with a constructor that takes 0 aruments. juices is an array of a different class.
shelf<fruitJuice> storeJuice();
for(ctr=0; ctr < 5; ctr++)
storeJuice.addObject(juices[ctr]);
shelf is a template class with a constructor that takes 0 aruments. juices is an array of a different class.