文件输入输出的模式
来源:互联网 发布:python快速开发平台 编辑:程序博客网 时间:2024/05/17 22:03
文件模式:
文件模式组合:
out 打开文件做写操作,删除文件中已有的数据out | app 打开文件做写操作,在文件尾写入out | trunc与out模式相同in 打开文件做读操作in | out 打开文件做读写、写操作,并定位于文件开头处in | out | trunc打开文件做读、写操作,删除文件中已有的数据例子:
#include <iostream>#include <cstdlib>#include <fstream>using namespace std;int main(){fstream outfile;outfile.open("1.txt", fstream::out|fstream::trunc);for( int i = 0; i < 1000; i++ )outfile<<i<<' ';outfile<<endl;outfile.close();system("pause");}
- 文件输入输出的模式
- 文件输入输出&文件模式
- st的输入输出模式
- 文件的输入输出函数
- 输入输出文件的缓冲区
- 文件的输入输出函数
- c++文件的输入输出
- 文件的输入输出函数
- Java的文件输入输出
- 文件的输入输出
- acm文件的输入输出
- 文件输入输出的例子
- 【c++】文件的输入输出
- 文件的输入输出 C++
- 文件的输入输出 part1
- 控制台文件的输入输出
- Java的文件输入输出
- 文件的输入输出
- 经典UITableView实现
- Modbus通信协议
- 一段神奇的Java代码
- 教你如何提高编程技能的十二种方法
- 单例模式
- 文件输入输出的模式
- poj 1354 Placement of Keys(错排变形)
- 观察者模式
- UILabel 显示多行文字
- Android传感器介绍及指南针的实现
- Fedora 12自动添加用户目录为smb共享目录
- js只能输入数字及小数点
- 关于WCF+MVC+EF 学习系列文章整理
- 《离散数学及其应用》读书笔记-二分法