Guardian C Library Calls Reference Manual

freopen
3-60 128833Guardian TNS C Library Calls Reference Manual
Reference to Library Calls
Example
In this example, the freopen function automatically closes $a.b.c and attaches a new file
named, $a.b.c to the same file pointer:
#include <stdioh>
FILE *fp;
FILE *fpr;
fp = fopen("$a.b.c", "r");
/* ... */
fpr = freopen("$a.b.c", "r", fp);