错误 - |在'''''令牌 | main(argc,argv) | { | int argc; | char * argv [50 ]; | { 这应该是 int main(int argc,char * argv []) { 你有太多的{和'过时的语法。 (正如之前提到的那样,b / b ,看来你用的任何书都应该烧掉。) - - __________________________________________________ ______________________ Alan Coopersmith al***@alum.calberkeley.org http://www.CSUA.Berkeley。 EDU / ~alalan / 又名: Al ********** ****@Sun.COM 为Sun Microsystems,Inc。工作,但绝对不代表eh***********@yahoo.com (hp******@yahoo.com) writes in comp.unix.solaris:|I wrote that program from a book that my compile that program|correctly under C++ compiler but I got those errors for compiling|under unix !!||Errors-|--------|part10_iti_r01_ch10_verbo_menu_driven_programs.c: In function `main'':|part10_iti_r01_ch10_verbo_menu_driven_programs.c: 6: warning:|declaration of `argc'' shadows a parameter|part10_iti_r01_ch10_verbo_menu_driven_programs.c: 7: warning:|declaration of `argv'' shadows a parameter|part10_iti_r01_ch10_verbo_menu_driven_programs.c: 22: syntax error|before ''{'' token|main (argc,argv)|{|int argc;|char *argv[50];|{This should beint main (int argc, char *argv[]){You''ve got too many {''s along with obsolete syntax. (As has beenmentioned before, it appears whatever book you''re using should beburned.)--__________________________________________________ ______________________Alan Coopersmith al***@alum.calberkeley.org http://www.CSUA.Berkeley.EDU/~alanc/ aka: Al**************@Sun.COMWorking for, but definitely not speaking for, Sun Microsystems, Inc. 这篇关于从书中写出程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
05-28 09:31
查看更多