vectors or dynamic arrays?

If a program only requires that a boardgame board be of the sizes of ROWS and COLUMNS, then can a 2D vector be used instead of a dynamic 2D array?

Dynamic 2D arrays are turing out to be a nightmare of syntax errors, and i would rather use a vector.
Sure you could use a 2D vector. You could also use a 1D vector or a static 1D array. You'd then write a function
1
2
3
T get(int x, int y) {
   board[y*width + x];
}
I would use a one dimensional array or vector, as hamsterman suggested. While it's arguably slightly less readable, it will make the rest of your programming much easier.
If I have to choose between vectors or dynamic arrays, I feel that vectors are easier to deal with and there is less possibility for memory leaking. Therefore unless there is a specific reason why I may NEED a dynamic array, I'll take vectors.
If the size is not variant, you can easily use a statically defined 2D array.
Topic archived. No new replies allowed.