什么是 std::filebuf 等价于 ifstream::eof ::fail 和 ::tellg

What are std::filebuf equivalent of ifstream::eof ::fail and ::tellg

本文关键字:fail eof tellg ifstream 等价于 std filebuf 什么      更新时间:2023-10-16

如果使用std::filebuf,是否有与以下函数等效的函数?

std::ifstream::eof
std::ifstream::fail
std::ifstream::tellg

如果是,是哪个?

没有。这些内容与流有关,而不是这些使用的数据缓冲区。

std::ifstream的全部目的是在std::filebuf之上添加此类功能。