在线文档教程
C++
输入/输出 | Input/output

std::ftell

STD::FTELL

Defined in header
long ftell( std::FILE* stream

返回文件流的文件位置指示符的当前值。stream...

如果流是以二进制模式打开的,则此函数获得的值是文件开头的字节数。

如果流是以文本模式打开的,则此函数返回的值未指定,仅在输入到std::fseek...

参数

stream-file stream to examine

返回值

文件位置指示符是否成功或-1L如果发生故障。也集errno在失败的时候。

另见

fgetposgets the file position indicator (function)
fseekmoves the file position indicator to a specific location in a file (function)
fsetposmoves the file position indicator to a specific location in a file (function)
tellgreturns the input position indicator (public member function of std::basic_istream)
tellpreturns the output position indicator (public member function of std::basic_ostream)

c FTELL文件

© cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

http://en.cppreference.com/w/cpp/io/c/ftel