I have lots of arrays with different sizes so they can't be multidimensional array as far as i know, so i named them as follows:
arr1[]
arr2[]
arr3[]
arr4[]
...
now can i use for loop to go over them and access them...
for(int i=1; i<5; i++) {
for(int j=o; i<etc; j++) {
cout<<arr[i][[j]<<endl;
}
}
or cout<<arr+i<<endl;
now this obviously is telling compiler to add arr and i together, but that is not what i want. I want it to print arr1, arr2, etc.
I have tried, putting dot, comma, slashes, etc.
std::vector<std::vector<T>>?because using array is the requirment,You do know thatvectoruses a dynamic array internally, right? The internal array can be accessed very easily. So what's the actual reason why you can't use vector?