Declaring a pointer to multidimensional array and allocating the array

const int someheight = 3;
const int somewidth = 5;

int (*array)[somewidth] = new int[someheight][somewidth];

Leave a Comment