Convert 2D vector to 2d array
问题 I have some C++ code that uses a 2D vector and needs to call an external library that uses a pointer the array with rows and col as parameters. So what I need to do is convert my 2d vector into a format that I can shove into foo((float *)data, int rows, int cols) . So 2D Vector data ---code---> foo((float *), int row, int cols) Trying to convert the 2d vector to a 2d array wasn't working very well using Converting 2D vector to 2D array This example uses double pointers and I don't know how to