Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

freopen c++

/* freopen example: redirecting stdout */
#include <stdio.h>

int main ()
{
  freopen ("myfile.txt","w",stdout);
  printf ("This sentence is redirected to a file.");
  fclose (stdout);
  return 0;
}
Source by www.cplusplus.com #
 
PREVIOUS NEXT
Tagged: #freopen
ADD COMMENT
Topic
Name
8+3 =