IOStream 操作说明

从MSDN上拿下关于IO Stream类的操作说明,方便以后使用:

class basic_ios: 

bad

Indicates a loss of integrity of the stream buffer.

clear

Clears all error flags.

copyfmt

Copies flags from one stream to another.

eof

Indicates if the end of a stream has been reached.

exceptions

Indicates which exceptions will be thrown by the stream.

fail

Indicates failure to extract a valid field from a stream.

fill

Specifies or returns the character that will be used when the text is not as wide as the stream.

good

Indicates the stream is in good condition.

imbue

Changes the locale.

init

Called by basic_ios constructors.

move

Moves all values, except the pointer to the stream buffer, from the parameter to the current object.

narrow

Finds the equivalent char to a given char_type.

rdbuf

Routes stream to specified buffer.

rdstate

Reads the state of bits for flags.

set_rdbuf

Assigns a stream buffer to be the read buffer for this stream object.

setstate

Sets additional flags.

swap

Exchanges the values in this basic_ios object for those of another basic_ios object. The pointers to the stream buffers are not swapped.

tie

Ensures that one stream is processed before another stream.

widen

Finds the equivalent char_type to a given char.

 

class istream

gcount

Returns the number of characters read during the last unformatted input.

get

Reads one or more characters from the input stream.

getline

Reads a line from the input stream.

ignore

Causes a number of elements to be skipped from the current read position.

peek

Returns the next character to be read.

putback

Puts a specified character into the stream.

read

Reads a specified number of characters from the stream and stores them in an array.

readsome

Read from buffer only.

seekg

Moves the read position in a stream.

sentry

The nested class describes an object whose declaration structures the formatted input functions and the unformatted input functions.

swap

Exchanges this basic_istream object for the provided basic_istream object parameter.

sync

Synchronizes the input device associated with the stream with the stream's buffer.

tellg

Reports the current read position in the stream.

unget

Puts the most recently read character back into the stream.

 

class ostream

endl

Terminates a line and flushes the buffer.

ends

Terminates a string.

flush

Flushes the buffer.

Exchanges the values of the left basic_ostream object parameter for those of the right basic_ostream object parameter.

 
 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值