Hi,
I just wonder if this is possible:
(semi-pseudocode (won't work as planned))
ofstream fout("my_file.txt");
fout << cout;
Looking forward to your reply
atch
0
Junior Poster in Training
Recommended Answers
Jump to Postso you want to output the screen output screen to a file?
Jump to PostWhen the hoops you have to jump through to get this kind of behavior through the library are both advanced and somewhat obscure, one wonders what's so hard about manually writing to fout each time you write to cout (or calling a function that does it for you)...
All 6 Replies
NathanOliver
429
Veteran Poster
Featured Poster
JameB
66
Junior Poster
atch
0
Junior Poster in Training
mvmalderen
2,072
Postaholic
kvprajapati
1,826
Posting Genius
Team Colleague
Narue
5,707
Bad Cop
Team Colleague
mvmalderen
commented:
Simple and clever :)
+17
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.