Message-ID: <37B9F16F.8605AC4B@sympatico.ca> From: websurfr X-Mailer: Mozilla 4.61 [en] (Win98; I) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Error in this? Please reply. Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 72 Date: Tue, 17 Aug 1999 23:31:52 GMT NNTP-Posting-Host: 209.226.93.211 X-Trace: news20.bellglobal.com 934932712 209.226.93.211 (Tue, 17 Aug 1999 19:31:52 EDT) NNTP-Posting-Date: Tue, 17 Aug 1999 19:31:52 EDT Organization: Sympatico To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hello everybody, I'm running DJGPP v.2 with a bunch of other files and the following code gives the following error: C:\c\modez.c: In function 'main': C:\c\modez.c:36: parse error before `for' C:\c\modez.c:36: parse error before `)' C:\c\modez.c:37: parse error before `)' C:\c\modez.c:21: warning: return type of `main' is not `int' ------------------------------------------------------------------------------------- // MODEZ.C - A demo of mode Z (320x400x256) // I N C L U D E S ///////////////////////////////////////////////////////////////////////// #include #include #include #include #include #include #include #include #include #include #include #include // MAIN //////////////////////////////////////////////////////////////////////////////////// void main(int argc, char **argv) { int index, // loop variables x, y, color; // holds the current color // set the graphics mode to mode Z 320x400x256 Set_Mode_Z(); // fill the screen with dark grey Fill_Screen_Z(8) // plot 1000 pixels in each of the colors for (color=1; color<256; color++) for (index=0; index<1000; index++) Write_Pixel_Z(rand()%320,rand()%400,color); // wipe screen for (index=320; index>=0; index--) for (y=0; y<400; y++) Write_Pixel_Z(index,y,0); // restore the video system to text Set_Graphics_Mode(TEXT_MODE); } // end main P.S Thanks in advance.