std::vector<CustomClass *> whatever(20000);
std::vector<CustomClass *> whatever; whatever.reserve(20000);
The former sets the actual size of the array -- i.e., makes it a vector of 20000 pointers. The latter leaves the vector empty, but reserves space for 20000 pointers, so you can insert (up to) that many without it having to reallocate.
You should probably be aware that chances of this doing any real good are minimal though.