To create a dynamically-allocated array, I use:
int *x = new int[100];
This creates an array of 100 int elements.
However, if I use:
std::vector<int> *x = new vector<int>(100);
This also creates an array of 100 int elements. But why does it not create an array of 100 vector<int> elements? And how would I go about doing that?
()instead of[]. I have added an answer which shows how to dynamically allocate an array of vectors, although I am not sure if that is what you really want.