Obtains the file descriptor associated with a stream.
Compatibility:This function is compatible with the following targets:
|
ANSI
|
BeOS
|
EMB/RTOS
|
|
#include <unix.h>
int fileno(FILE *stream);Parameters:
Parameters for this facility are:
For the standard I/O streams stdin, stdout, and stderr, fileno() returns the following values:
|
This function call
|
Returns this file descriptor
|
|---|---|
#include <unix.h>
#include <stdio.h>
int main(void)
{
printf("The handle for the standard input device is: %d",
fileno(stdin) );
return 0;
}
Reult
The handle for the standard input device is: 0
[ First ] [ Previous ] [ Next ] [ Last ] [ Manuals ]
Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.
Last updated: August 16, 2000