std::ftell

std::ftell

Defined in header <cstdio>
long ftell( std::FILE* stream );

Returns the current value of the file position indicator for the file stream stream.

If the stream is open in binary mode, the value obtained by this function is the number of bytes from the beginning of the file.

If the stream is open in text mode, the value returned by this function is unspecified and is only meaningful as the input to std::fseek.

Parameters

stream - file stream to examine

Return value

File position indicator on success or -1L if failure occurs. Also sets errno on failure.

Example

See also

gets the file position indicator
(function)
moves the file position indicator to a specific location in a file
(function)
moves the file position indicator to a specific location in a file
(function)
returns the input position indicator
(public member function of std::basic_istream)
returns the output position indicator
(public member function of std::basic_ostream)
C documentation for ftell

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/io/c/ftell

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部