Hi,
I would like to create a dynamic array of vectors. This is my code so far:
I would then like to read a file and put the different lines in different vectors and store the pointer to the vectors in the array.Code:std::vector<int> vectorInput; /*A vector containing the input from the file*/
std::vector<int> *vectorArray; /*A dynamic array containg the vector for the different nodes*/
vectorArray = new std::vector<int>[numberOfNodes];
Since I do not know the number of lines beforehand, I was wondering how to dynamically create the vectors. Thanks
Amish