![]() |
Home
| Calendar
| Mail Lists
| List Archives
| Desktop SIG
| Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings Linux Cafe | Meeting Notes | Linux Links | Bling | About BLU |
Ooh! Ooh! Ooh! Mr. Kotter! > #include <stdio.h> > > #define D1 4 > #define D2 2 > > int main(){ > > int *array; Here you're defining "array" as a pointer to an int. > > array = malloc(sizeof(int) * (D1 * D2)); > > array[1][1] = 32; Here you're using "array" as a pointer *to a pointer* to an int. > > printf("Elem[1][1] = %d\n",array[1][1]); > > free(array); > > return 0; > } Try changing "int *array" to "int **array".
![]() |
|
BLU is a member of BostonUserGroups | |
We also thank MIT for the use of their facilities. |