老菜的园子

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2009-5-13

I/O相关的类

ios

-->istream, ostream, iostream

-->ifstream, ofstream, fstream; istringstream, ostringstream, iostringstream


streambuf
 --> filebuf, stringbuf

一个不错的C++在线参考网站http://www.cplusplus.com/
这里提供了I/O相关类的关系图

File I/O 的教材

Input/Output with files

File I/O in C++ : part 1 of 2

File I/O in C++ : part 2 of 2

主要的函数

open()

close()

is_open()

rdstate()

clear()

get()

put()

read()

write()

getline()

flush()

seekp() / seekg()

tellp() / tellg()

ignore()

putback()

peek()

对流格式的控制

通过Manipulator 实现,比C语言中的format string 更方便使用。

posted on 2010-09-14 21:56  weichsel  阅读(252)  评论(0编辑  收藏  举报