C语言实现文件信息统计

 时间:2024-10-13 17:13:51

1、首先打开VC++6.0

C语言实现文件信息统计

3、选择C++ source file 新建一个空白文档

C语言实现文件信息统计

6、主函数void main猾诮沓靥(int argc, char **argv ){int n=argc;if(argc<2)printf("Please input th髫潋啜缅e command: 43 file1 file2 ... filen");/*初始化全局变量*/charcount=0;wordcount=0;linecount=0;/*依次统计每个文件的信息*/while(--n>0)CountLWC(*(++argv));/*输出所有文件的统计信息*/if(argc>2){printf("\nThe information in all files is:\n");printf(">>Lines = %d\n",linecount);printf(">>Words = %d\n",wordcount);printf(">>Chars = %d\n",charcount);}getch();}

C语言实现文件信息统计
  • 如何学好民航法
  • 面试:无领导小组讨论流程简介
  • 一岁以内婴儿的视觉发育顺序
  • 咪莫图文攻略
  • 果酱面包的做法
  • 热门搜索
    石正丽简介 减肥食品 电车之狼怎么玩 北海银滩旅游攻略 攻略不下来的男人 红烧鲤鱼怎么做 体内有湿气怎么办 广汽本田怎么样 红烧安康鱼 牛仔短裙怎么搭配