Chinaunix首页 | 论坛 | 博客
  • 博客访问: 146721
  • 博文数量: 58
  • 博客积分: 1584
  • 博客等级: 上尉
  • 技术积分: 605
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-12 10:06
文章分类

全部博文(58)

文章存档

2011年(7)

2010年(51)

我的朋友

分类: C/C++

2010-11-06 15:39:25

在已有的日志文件下追加:ofstrem outfile("test.log",ios_base::app);
阅读(1025) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2010-11-06 16:07:10

1. "ios_base::in" means open file for input, "ios_base::app" means "append, or write only to the end of a file". 2. Read and Write position are not separately maintained, there is only one "STREAM POSITION" for each object. Thus, I don't think "ios_base::in || ios_base::app" will make any sense. 3. You could try using just "fstream iofile("c://text.txt");", since the standard assumes "ios::in | ios::out" as default mode. However, it is still not a good idea to do input and output with