c++语言的本地磁盘的读写
2017-05-18 11:48
435 查看
#include "stdafx.h" #include <iostream> #include <fstream> using namespace std; int main() { //输出到磁盘 //打开文件 ofstream ofs("a.txt", ios::out); ofs << "this is out!!" << endl; ofs << "this is out!!" << endl; //关闭文件 ofs.close(); //输入到程序 ifstream ifs("a.txt",ios::in); char buf[80]; while (!ifs.eof()) { ifs.getline(buf, 80); cout << buf << endl; } ifs.close(); return 0; }
相关文章推荐
- 如何验证本地磁盘或网络磁盘是否可以进行读写操作
- 修改ipxe源码,实现隐藏本地磁盘和读写转移功能(一)
- 修改ipxe源码,实现隐藏本地磁盘和读写转移功能(二)
- 在ipxe源码基础上,重新封装读写本地磁盘接口
- windows 10 超级优化,同时解决本地磁盘100%的问题
- 正确用DD测试磁盘读写速度--csdn(xrb66的专栏)
- 磁盘读写原理
- 使用dd命令测试磁盘读写性能
- 远程桌面无法看见本地磁盘解决办法及增加连接数
- 把从服务器获得图片的输入流InputStream写到本地磁盘
- Win10由于服务主机本地系统进程导致磁盘占用很高的问题的解决
- 0. 磁盘读写与数据库的关系 推荐
- 使用java将数据库文件复制到本地磁盘中
- 【Android调试笔记】磁盘挂载读写
- 共享了磁盘,但在远程桌面的机器上看不到自己共享的本地硬盘
- javaScript 操作本地磁盘
- 自动扫描所有本地磁盘,获取所有图片信息
- 使用iozone测试磁盘性能(测试文件读写)
- Java Jsoup抓取符合指定大小的网页的图片,并保存在本地磁盘
- VMware Horizon View 6.0本地客户端磁盘重定向到虚拟主机里面