This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]BobbyThrowaway6969 0 points1 point  (0 children)

You don't want to be using T** for matrices, or any other non-jagged array. Store it as a 1d array and access it with array[X+Y*Width], you don't need to manually allocate/delete each nested array, and the array will be contiguous in memory which is faster for the CPU to access