Message-ID: <01BFD0CA.CA780E20@mdm124.plug-in.com.br> From: Marcelo Juchem <mj-me AT plug-in DOT com DOT br> To: "'djgpp AT delorie DOT com'" <djgpp AT delorie DOT com> Subject: I'm having some problems when using the special parameters for main() Date: Wed, 7 Jun 2000 21:52:38 -0300 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com I'm having some problems when using the special parameters for main(). Please, could you tell-me what am I doing wrong? Thank you! Marcelo Juchem, mj-me AT plug-in DOT com DOT br THE RESULTS AND SOURCE-CODE FOLLOW: --------------------------------------------------------------------------- With the following command-line: gpp -o cmdline.exe cmdline.cpp The results are: --------------------------------------------------------------------------- cmdline.cpp: In function `int main(int, char **)': cmdline.cpp:11: invalid types `int[int]' for array subscript --------------------------------------------------------------------------- With the following command-line: gpp -O3 -o cmdline.exe cmdline.cpp The results are: --------------------------------------------------------------------------- cmdline.cpp: In function `int main(int, char **)': cmdline.cpp:11: invalid types `int[int]' for array subscript --------------------------------------------------------------------------- The following source code: --------------------------------------------------------------------------- #include <stdio.h> #include <conio.h> void waitkbd(void); int main(int argc,char **argv) { int c; printf("\n "); for(c=1;c<argc-1;c++) printf("%s ",argc[c]); waitkbd(); return(0); } void waitkbd(void) { while(kbhit()) getch(); getch(); }