No.62012 作者:jola 邮件:ch181120@163.net ID:10295 登陆:39次 QQ:122348673 文章数:145篇 最后登陆IP:210.21.215.18 最后登陆:2005/1/7 17:49:35 注册:2003/3/16 12:29:00 财富:637 发帖时间:2004/9/9 9:23:15 发贴者IP:210.21.215.10 标题:jola:问个问题 摘要:No.62012问个问题 下面的程序,传递参数int argc有什么作用的阿? #include <stdio.h> main( int argc ,char *argv[]) { FILE *fp; int count=0; if((fp=fopen(argv[1],"r"))==NULL) { printf("can not open file %s\n",argv[1]); exit(0); } while(fgetc(fp)!=EOF) count++; fclose(fp); printf("file %s contains %d characters ",argv[1],count); getchar(); } ......
>>返回讨论的主题
|