Alexey Salmin wrote: >> ^ This is wrong. Should be >> >> int **table1=malloc(10000000*sizeof(int**)); >> >> The same error occurs several times. >> >> You also need >> >> if (!table1 || !table1_aux) >> perror (""); >> > > LOL, you've got to be kidding us :) > "table1" is pointer to an array of (int *). That's why it has type (int **). Sorry, thinko: sizeof(int*). Not that it will make any difference, of course. The change from sizeof(int) to sizeof(int *) is still needed. Andrew.