Returns the low level I/O file handle.
int _fileno (FILE * stream);
int fileno (FILE * stream);
Required Header |
<stdio.h> |
Return Value
Each of these functions returns a file handle associated with a stream. -1 indicates an error.
Parameters
stream
A pointer to an open FILE structure
Remarks
The _fileno function returns the low level I/O handle associated with stream so that it may be used with the low level I/O routines. The usual reason for this is to duplicate one of the predefined FILE pointers stdin, stdout or stderr using _dup.