std::ftell
Defined in header <cstdio> | | |
|---|---|---|
long ftell( std::FILE* stream ); | | |
返回文件流的文件位置指示符的当前值。stream...
如果流是以二进制模式打开的,则此函数获得的值是文件开头的字节数。
如果流是以文本模式打开的,则此函数返回的值未指定,仅在输入到std::fseek...
参数
stream | - | file stream to examine |
|---|
返回值
文件位置指示符是否成功或-1L如果发生故障。也集errno在失败的时候。
例
另见
fgetpos | gets the file position indicator (function) |
|---|---|
fseek | moves the file position indicator to a specific location in a file (function) |
fsetpos | moves the file position indicator to a specific location in a file (function) |
tellg | returns the input position indicator (public member function of std::basic_istream) |
tellp | returns the output position indicator (public member function of std::basic_ostream) |
c FTELL文件
© cppreference.com在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。
本文档系腾讯云开发者社区成员共同维护,如有问题请联系 cloudcommunity@tencent.com

