#include
main()
{
ifstream in("FileStreamTest.cpp");
while (in.get(*cout.rdbuf()))
in.ignore();
}
这个主要是什么意思?特别是in.get(*cout.rdbuf())这一个怎么解释?谢谢。
t****t 发帖数: 6806
2
[27.6.1.3]
....
basic_istream& get(basic_streambuf& sb,
char_type delim );
Effects:
Extracts characters and inserts them in the output sequence con-
trolled by sb. Characters are extracted and inserted until any of
the following occurs:
--end-of-file occurs on the input sequence;
--inserting in the output sequence fails (in which case the character
to be inserted is not extracted);
--c == delim for the next ava