Basic question but need a solution

Hi,

I have to create and use a lot of vectors like vector<double> vage_1; vector<double> vage_2; vector<double> vage_3; ......

I know we cannot use for loop to create and use these vectors by incrementing the number in their names. But is there any solution for this, please?
You could put the vectors in a vector.

vector<vector<double>> vages;
Create an array of vectors, use the subscript to access the vector you want.

Alternatively use any container which has the at function.

Just wondering why you need all these vectors? There might another design solution.
Topic archived. No new replies allowed.