[Solved] Vector of pointers to vectors


Given your declarations, you need

vecP[1]->resize(6);
// or
vecP[1]->at(3) = 7;

The problem being that since your (top level) vector elements are pointers, you need to dereference them to access their contents. The easiest way of dereferencing is to use -> instead of ., as I did above, but you can also use (unary) *.

solved Vector of pointers to vectors