It's been a little while since I used C++, but I believe the core problem you're encountering is that arrays don't have the required semantics to get along well with a std::vector<>. I don't have my copy of Stroustrup handy, or I'd give you a reference.