Hi, Is there a way I can read what is being dumped on the terminal by someway attaching the stdout to my program (only in C++)? I tried freopen("dummy_file". "w", stdout); cout << "test"; fclose(stdout); cout << " Back to normal"; Though I get test in the dummy_file but, the above fclose() closes the stdout(It seems, I am not sure) since the second cout is not being printed on the terminal.
So, how can I link stdout and then unlink it again? I just need to read a couple of things from stdout into my program. And I know there must be a better solution using file streams. Any * 's ? Thanks, Saurabh ----------------------------------------- I don't "mix" well socially.... but am readily "soluble" with alcohol... __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com To unsubscribe, send a blank message to <mailto:[EMAIL PROTECTED]>. Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/c-prog/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/c-prog/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/