I need to write all my program output to a text file. I believe it\'s done this way,
sOutFile << stdout;
where sOutFile is the ofstr
sOutFile << stdout;
in C "stdout
" is defined as a FILE*
variable. It's just a pointer. Outputing it to a file just writes the value of the pointer, in your case: 0x77c5fca0
to the file.
If you want to direct your output to a file either write it the a file in the first place or redirect the output of your program to a file using the command line.