void **dim2 (row, col, size) MEMORY?.C Any Level
 
int row The number of rows in the 2-D array.
int col The number of columns in the 2-D array.
unsigned int size The size of each object in the array in bytes.
 
 
dim2() dynamically allocates 2-D arrays so that they can be quickly addressed using array notation. An array of pointers is allocated to point to the memory for each row. Then the memory for each row is allocated separately. This technique has three major advantages: 1) the size of each row can be up to 64 kb long (in DOS and Widnows 3.1); 2) the memory allocated for the array need not be contiguous; and 3) the memory is addressed more quickly since the multiplication necessary to find the start of each row is eliminated. The contour-plotting routines conmat2() and lconmat2() take advantage of this capability.