A "break;" statement in a for loop doesn't make sense. By doing this:
for(vector<Container*>::iterator it = containers.begin(); it != containers.end(); it++)
{
if(!(*it)->getFull())
{
(*it)->addItem(itemAdd);
break;
}
}
You modified a for loop to a while loop. Hence what you really need here is a while loop.Both works fine, it makes a difference when a Theoretical IT guy needs to verifiy the program.
A for loop is simple, it knows at runtime the exact amount of times the body is executed. A while loop is a bit more complicated. And by camouflaging a for loop in a while loop, you make the poor guy cry.
To the problem: it seems to me your problem lies in your OO class concept, or maybe a missing virtual keyword in a method. If you want to read up on the C++ virual keyword, www.learncpp.com had a good tutorial on it IMO.
I'm sorry, I cannot debug the code from where I currently am.