C++文件长度
来源:互联网 发布:微信抢号软件 编辑:程序博客网 时间:2024/05/22 05:20
以下程序可以计算TXT文件的长度。
#include <cstdlib>
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
ifstream fina;
fina.open("test.txt");
fina.seekg(0,ios::end);
int endI = fina.tellg();
fina.seekg(0,ios::beg);
int beginI = fina.tellg();
int size = endI - beginI; //文件长度
cout<<size<<endl;
return 0;
}
0 0
- C语言获取文件长度
- c / c++获取文件长度
- C 语言获取文件长度
- c语言获取文件长度
- C/C++ 获取文件长度
- C中获取文件长度
- c语言获取文件长度的方法
- C语言下得到文件的长度
- C/C++ 获取文件长度(转)
- C中获取文件长度的方法
- C语言获取文件长度及全部内容
- linux C: lseek 获取文件长度
- C语言获取文件长度及全部内容
- 文件长度
- c/vc++ 环境下不同的文件长度获取方法
- c/vc++ 环境下不同的文件长度获取方法
- c/vc++ 环境下不同的文件长度获取方法
- c语言中获取文件长度的一种方法
- Aerospike数据库配置
- python sklearn包——cross validation笔记
- 【bzoj 1012】[JSOI2008]最大数maxnumber(线段树||st表)
- #392 – 使用SnapsToDevicePixels 属性消除抗锯齿效果(Use SnapsToDevicePixels Property to Prevent Anti-Aliasing)
- Spring@Autowired注解与自动装配
- C++文件长度
- Android设计模式系列(2)--SDK源码之观察者模式
- MySQL索引
- 服务器的瞬时 diffiehellman 公共秘钥过弱
- angularjs-表单验证事件
- Swift 3 新变化
- Linux kernel 内核延时函数
- CentOS7.2安装NVIDIA驱动
- Apache Commons-logging使用实例