From: "Daniel Eliasson" Newsgroups: alt.comp.lang.learn.c-c++,comp.os.msdos.djgpp Subject: Problem with int[][] Lines: 28 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: Date: Thu, 22 Mar 2001 06:20:04 GMT NNTP-Posting-Host: 193.150.238.248 X-Complaints-To: abuse AT chello DOT se X-Trace: nntp1.chello.se 985242004 193.150.238.248 (Thu, 22 Mar 2001 07:20:04 MET) NNTP-Posting-Date: Thu, 22 Mar 2001 07:20:04 MET Organization: chello broadband To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I keep getting these messages when I use my array: player.cpp:55: invalid types `int[int]' for array subscript player.cpp:57: invalid types `int[int]' for array subscript The code looks like this: for(int i = 0; i < GRIDSIZE; i++) { for(int j = 0; j < GRIDSIZE; j++) { if(map[i][j] == GRID_PLAYER) // It's complaining about these { map[i][j] = GRID_EMPTY; // It's complaining about these } } } Does anyone know what's wrong? I define map like this: int map[GRIDSIZE][GRIDSIZE]; (GRIDSIZE is a const int with the value of 128 (const int GRIDSIZE = 128;)) Thanks in advance, Daniel Eliasson