Namespaces
Variants
Views
Actions

std::ftell

From cppreference.com
< cpp‎ | io‎ | c
Revision as of 08:29, 5 December 2012 by Cubbi (Talk | contribs)

 
 
 
 
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

Contents

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

Template:cpp/io/c/dcl list fgetposTemplate:cpp/io/c/dcl list fseekTemplate:cpp/io/c/dcl list fsetposTemplate:cpp/io/basic istream/dcl list tellgTemplate:cpp/io/basic ostream/dcl list tellp
C documentation for ftell