您的位置:首页 > 编程语言 > C语言/C++

C++学习笔记:IO操作

2010-05-26 10:41 330 查看

C++学习笔记:IO操作

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 更方便使用。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: