19_1.cpp
资源名称:c.rar [点击查看]
上传用户:puke2000
上传日期:2022-07-25
资源大小:912k
文件大小:0k
源码类别:
C#编程
开发平台:
Visual C++
- #include <iostream.h>
- #include <fstream.h>
- void main()
- {
- char str[128];
- int count=0;
- ifstream fin("19_1.cpp");
- fin.getline(str,sizeof(str));
- while(!fin.eof()){
- count++;
- fin.getline(str,sizeof(str));
- }
- cout <<"the amount of lines of file 19_1.cpp is " <<count <<endl;
- }