Mail Archives: djgpp/2001/12/17/11:42:34
//A question about this small code appears below
#include <iostream.h>
#include <stdio.h>
main()
{cout<<"hello world"<<'\n'; //Writes "hello world" to screen
freopen("hi","w",stdout); //Redirects output to file hi
cout<<"hi world"<<'\n'; //Writes "hi world" to file hi
freopen("ho","w",stdout); //Redirects output to file ho
cout<<"ho world"<<'\n'; //Writes "ho world" to file ho
//QUESTION: What do I put here so that the output of the next
//line appears on the screen again.
cout<<"hello again world"<<'\n';
return 0;
}
//This question is related to the use of the functions
//mpf_out_str and mpf_inp_str in the delorie port of gmp
//to DOS. Thanks for your help.
- Raw text -