Pointer to one row in dynamically allocated 2D array in C++ -


i have dynamically allocated 2d array volatility[r][c] r rows , c columns in c++. somehow possible create pointer ptrcolumn column c1, such can access element (r1,c1) ptrcolumn[r1]?
far, tried create dynamic pointers. didn't manage it.

thank you!

no, that's not possible. 1 alternative have create 2d array traspose of original array useless because you'd have update array every time original array changes. perhaps there other ways array of columns don't.


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -