首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

帮小弟我看看这句代码是什么意思

2012-03-02 
帮我看看这句代码是什么意思?fstreamfile( reader.txt ,ios::in)后面的ios::in是什么?[解决办法]ios:in

帮我看看这句代码是什么意思?
fstream   file( "reader.txt ",ios::in);

后面的ios::in是什么?

[解决办法]
ios:in 以输入方式打开文件
fstream file( "reader.txt ",ios::in);
//定义输入输出文件流对象,以输入方式打开文件reader.txt
[解决办法]
ios::in The file is opened for input. The original file (if it exists) will not be truncated.
这里是创建一个fstream的对象file,并调用fstream的构造函数对其初始化,以输入方式打开文件

热点排行