std::basic_istream::readsome std::streamsize readsome( char_type* s, std::streamsize count ); 提取至count输入流中立即可用的字符。所提取的字符存储在s... 表现为UnformattedInputFunction.在构造和检查哨兵对象之后, 如果rdbuf()->in_avail() == -1,电话setstate(eofbit)不提取字符。
basic_istream&read(char_type*s,std::streamsizecount); 从流提取字符。 表现为无格式输入函数(UnformattedInputFunction)。构造并检查 sentry 对象后,提取字符并将它们存储到以s指向其首元素的字符数组中的相继位置。提取并存储字符,直至出现任何下列条件: ...
例如,对 std::ifstream 使用readsome() 时会导致明显的实现特定的效果。某些库实现在 std::ifstream 打开文件时立即以数据填充底层 filebuf,这意味着 readsome() 总能读取到数据而且甚至可能读取到整个文件。而 std::ifstream 的其他实现仅在请求实际输入操作时才从文件读取,这意味着文件打开后立即调用 readsome(...
basic_istream&read(char_type*s,std::streamsizecount); Extracts characters from stream. Behaves asUnformattedInputFunction. After constructing and checking the sentry object, extracts characters and stores them into successive locations of the character array whose first element is pointed to bys. Chara...
std::basic_istream:: read Extracts characters from stream. Behaves asUnformattedInputFunction. After constructing and checking the sentry object, extracts characters and stores them into successive locations of the character array whose first element is pointed to bys. Characters are extracted and ...
std::basic_istream<CharT,Traits>::readsome 从输入流释出至多count个立即可用的字符。存储释出的字符于s所指向的字符数组。 表现为无格式输入函数(UnformattedInputFunction)。构造并检查 sentry 对象后, 若rdbuf()->in_avail()==-1,则调用setstate(eofbit)而不释出字符。
std::basic_istream<CharT,Traits>::readsome std::streamsizereadsome(char_type*s,std::streamsizecount); 从输入流释出至多count个立即可用的字符。存储释出的字符于s所指向的字符数组。 表现为无格式输入函数(UnformattedInputFunction)。构造并检查 sentry 对象后, ...