X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f From: "Jake" Newsgroups: comp.lang.c,comp.os.msdos.djgpp Subject: Pointer Blues Lines: 52 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 Message-ID: Date: Mon, 21 Jan 2002 05:36:57 GMT NNTP-Posting-Host: 64.89.13.189 X-Trace: news 1011591417 64.89.13.189 (Mon, 21 Jan 2002 00:36:57 EST) NNTP-Posting-Date: Mon, 21 Jan 2002 00:36:57 EST To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Pointers are begining to drive me crazy. Ok here's the problem, I needed two 2 dimensional arrays that are visual to all the functions. So I defined two 'pointer-to-pointer' varibles of type int, thats what 2 dimensional arrays really are, 'pointers-to-pointer' right? That problem is the that whatever value I asign to one array shows up in the array, I can have have this. If someone can follow the code and know whats going on please help me out. thanks Jake #include int columns = 8; int rows = 8; int **map; int **mask; void initarray(int **arr); // allocates memory void display(int **arr); int main(int argc, char *argv[]) { int x,y; initarray(map); initarray(mask); for ( y = 0; y < rows;y++) for (x=0;x