 |
Question 6.16 - comp.lang.c Frequently Asked Questions
A: The traditional solution is to allocate an array [footnote] of pointers to pointers, and then initialize each pointer to a dynamically-allocated ``row.'' Here is a two-dimensional example: #include int **array1 = malloc(nrows * sizeof(int *)); for(i =
c-faq.com |
 |