SDL and redirection of standard output

Started by
0 comments, last by randomZ 20 years, 9 months ago
I''m using SDL. Normally, it''s supposed to redirect STDOUT and STDERR to the text files stdout.txt and stderr.txt. However, in my project, it seems to do so after its own free will. When I started my project, it did redirect the output. Then, for a long time, it didn''t, and today, all of the sudden, it again started redirecting it. Under what conditions is the output redirected? I have made no code changes to the parts of SDL initialization or the like. BTW, is there a nice C++ way of redirecting cout and cerr to files? My Wonderful Web Site (C++ SDL OpenGL Game Programming)
I am a signature virus. Please add me to your signature so that I may multiply.
---Just trying to be helpful.Sebastian Beschkehttp://randomz.heim.at/
Advertisement
To redirect stdout in C you can just do freopen("filename", "w", stdout). This will also redirect the output from the cout command. I don''t know if there''s an "official" C++ way to do it or not. (The same thing works with stderr).

This topic is closed to new replies.

Advertisement