I've read that a vector
-of-vector
s is bad given a fixed 2nd dimension, but I cannot find a clear explanation of the problems on http://www.stackoverflow.com.
Could someone give an explanation of why using 2D indexing on a single vector
is preferable to using a vector
-of-vector
s for a fixed 2nd dimension?
Also, I'm assuming that a vector
-of-vector
s is the preferable data structure for a 2D array with a variable 2nd dimension? If there is any proof to the contrary I'd love to see that.