VC++中文件读写汇总
来源:互联网 发布:网络电视的使用方法 编辑:程序博客网 时间:2024/06/03 15:59
1,读
A法: CString strFileName = "C:\\dd.txt"; std::ifstream in; std::locale::global(std::locale("")); in.open(strFileName); std::locale::global(std::locale("C")); std::string line; while(getline(in, line)) { cout<<line<<endl;}
B法:char readBuffer[500]; // 存放读取数据的缓存CFile file(_T("e:\\1.txt"), CFile::modeCreate | CFile::modeReadWrite); // 读取100个字节的数据到存放读取数据的缓存的readBuffer + lOff位置处int nRet = file.Read(readBuffer , 100); //100为希望读到长度, nRet为实际读到的长度file.close();
未完待续。。。。。。
0 0
- VC++中文件读写汇总
- vc中文件的读写操作
- [求助]关于C++和VC++中文件的读写问题
- VC++中文件读、写和其他相关操作汇总
- c中文件读写
- Java中文件读写
- ios中文件读写
- hadoop中文件读写
- java中文件读写
- Java中文件读写
- Python中文件读写
- python中文件读写
- VC++ 中文件日志
- IIS中文件的读写
- ASP中文件的读写
- C++中文件的读写
- C++中文件的读写
- C++中文件的读写
- [Leetcode]Remove Duplicates from Sorted List
- python怎样压缩和解压缩ZIP文件
- Web 测试工具合集
- 图像傅里叶变换(快速傅里叶变换FFT)
- 咳速停和速度还是能尽可能科技
- VC++中文件读写汇总
- Android开发环境搭建
- iOS学习之 plist文件的读写
- 纪念我改了N遍的SRS
- Python压缩文件夹/解压缩zip文件
- 设计模式--基础学习总结
- Unity3D学习之(迭代器)
- C语言中的文件流
- Struts2关于Action的系统训练3关于Action创建和path路径问题