Currently At: Programming Reference > C Reference > Stndard C I/O > freopen()

freopen()


Syntax:
#include <stdio.h>
FILE *freopen( const char *fname, const char *mode, FILE *stream );


Description:
The freopen() function is used to reassign an existing stream to a different file and mode. After a call to this function, the given file stream will refer to fname with access given by mode. The return value of freopen() is the new stream, or NULL if there is an error.

Related Topics:
fopen(), fclose()


Web Standards & Support:

Link to and support eLook.org Powered by LoadedWeb Web Hosting
Valid XHTML 1.0! Valid CSS! eLook.org FireFox Extensions