How do we create vectors of dynamic dimension like 2-dimensional vector, 3-dimensional, 4 dimensional...and so on where the dimension will only be determined at run time?
I'd need it to store chess generated moves....
I was thinking of that, nested structure but how do we implement it? Without using vector< vector<> > to implement a 2-D vector, how will it be implemented with nesting?
@coder - that is exactly what I need and am trying to do. I have been trying to write my own tree code and I need to be able to create vectors of dynamic dimension.
@Catfish - 2-D works but is less efficient and would be difficult to evaluate positions as depth increases. It would be hard to track positions 20 moves deeper after a certain position. I had created my own 2-D model but it is slow. It would have to search among those lists which is no longer part of the branch. If a tree can be created, it would be more efficient.