Well yes, a vector can grow to meet the number of elements you insert. If you want to restrict the max number, then add some code to do the check, as siaspete suggests. However, you have to check the upper limit with an array too. The difference with an array is that you get undefined behaviour if you go over the limit. To my mind, that''s much worse!
As for an STL reference, I''ve yet to find anything that even gets close to Josuttis'' The C++ Standard Library.
quote:Original post by siaspete
On a side note, I quite dislike the new code boxes.
Me too.