什么是 std::filebuf 等价于 ifstream::eof ::fail 和 ::tellg
What are std::filebuf equivalent of ifstream::eof ::fail and ::tellg
如果使用std::filebuf
,是否有与以下函数等效的函数?
std::ifstream::eof
std::ifstream::fail
std::ifstream::tellg
如果是,是哪个?
没有。这些内容与流有关,而不是这些流使用的数据缓冲区。
std::ifstream
的全部目的是在std::filebuf
之上添加此类功能。
相关文章:
- 如何确定我已使用非编码文件到达 EOF?
- Problems with std::cin.fail()
- std::ifstream::read 不会读取所有 512 字节,并设置 EOF 和失败位
- 而(!inputfile.eof())只读取第一行?
- EOF有更安全的替代方案吗?它在我的情况下不起作用
- "错误 C0000:语法错误,令牌"<EOF>"处出现意外$end,并且不确定
- 如何在 EOF 之前从文件中读取并将其放入字符串中?
- 如何在从文件中读取整数时使用 file.eof()?
- "eof"可以设置为流吗?
- 了解 cin.fail() 和 cin.clear语言 - Vector 追加程序
- 吃完 EOF 后重复使用 std::cin
- cin.fail() not returning true
- 文件处理,eof() 定义
- std::cin 在读取 EOF 并清除后不再读取
- 为什么 EOF 在循环扫描期间没有终止?
- cin.clear()是否保留EOF
- 而(getline(fin,str)){}即使在到达eof之后仍在处理数据
- 在C++流中,eof(),fail(),bad()和good()有什么区别
- C++ eof 上的 istream tellg()/fail() :行为改变;解决方法
- 什么是 std::filebuf 等价于 ifstream::eof ::fail 和 ::tellg