Is this array of 2D vectors?
C / C++ / MFC
2
Posts
2
Posters
4
Views
1
Watching
-
vector> mark[5]
Is this array of 2D vectors? How can I traverse or insert any element from user in this data structure?
-
vector> mark[5]
Is this array of 2D vectors? How can I traverse or insert any element from user in this data structure?
Try breaking it down into its constituent parts:
mark is an array of 5 elements.
Each element is a vector.
And each element of the vector is also a vector.
And each element of the inner vectors is an integer.As it stands though, the array is null, so you need to initialise each of its elements with a new vector. You then need to decide what actual information you want to store in the vectors.