%freopen() function

The %freopen() function substitutes the named file specified by str in place of the opened stream stream1.

Syntax

stream = (char*)%freopen(str, type, (char*)stream1)

Description

The stream is returned as a pointer to a character or 0 if an error has occurred. system(0) is then set to the error number.