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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.