Click here to Skip to main content
15,891,184 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralLNK errors 2019, 2001, 1120 Pin
Tom Farrell5-May-03 21:09
Tom Farrell5-May-03 21:09 
GeneralRe: LNK errors 2019, 2001, 1120 Pin
jhaga5-May-03 23:30
professionaljhaga5-May-03 23:30 
GeneralRe: LNK errors 2019, 2001, 1120 Pin
will13836-May-03 3:40
will13836-May-03 3:40 
GeneralIP Address Control Pin
JensB5-May-03 20:29
JensB5-May-03 20:29 
GeneralRe: IP Address Control Pin
Ryan Binns6-May-03 1:33
Ryan Binns6-May-03 1:33 
GeneralRe: IP Address Control Pin
David Crow6-May-03 4:33
David Crow6-May-03 4:33 
GeneralThe VxD problem Pin
Jeef5-May-03 17:59
Jeef5-May-03 17:59 
Generalredirected streams and stdout Pin
virtual me()5-May-03 16:50
virtual me()5-May-03 16:50 
Hi All,

I have a dilemma. I'm wrapping existing code that prints to stdout. I don't want those prints to show up on the screen, so I've redirected it using:

// redirect stdout to bit bucket
FILE* f = freopen("nul", "w", stdout);

I then created my own stream that prints to the console using:

// create a new stream to the console
fstream myStream;
myStream.open("CONOUT$");

Whatever I print using myStream shows up on the screen, which is what I want.

My problem? I can't redirect that output to a file! I push a ton of data out myStream, and really need the ability to redirect it.

Is there a limitation where only file handles associated with stdout itself, and not "CONOUT$", can be redirected to files?

Any insight on this would really, really be appreciated.


GeneralRe: redirected streams and stdout Pin
Andrew Walker6-May-03 0:19
Andrew Walker6-May-03 0:19 
GeneralCustom Component Newbie Question Pin
crewchill5-May-03 16:18
crewchill5-May-03 16:18 
GeneralRe: Custom Component Newbie Question Pin
Ryan Binns6-May-03 1:50
Ryan Binns6-May-03 1:50 
GeneralCGI printing under IIS Pin
Anonymous5-May-03 13:49
Anonymous5-May-03 13:49 
GeneralRe: CGI printing under IIS Pin
basementman6-May-03 5:16
basementman6-May-03 5:16 
QuestionCopying form a Window to MS Word? Pin
krle5-May-03 13:49
krle5-May-03 13:49 
QuestionHow do I control what happens on a keypress? Pin
Kaezin5-May-03 13:13
Kaezin5-May-03 13:13 
AnswerRe: How do I control what happens on a keypress? Pin
valikac5-May-03 13:47
valikac5-May-03 13:47 
AnswerRe: How do I control what happens on a keypress? Pin
Michael Dunn5-May-03 17:43
sitebuilderMichael Dunn5-May-03 17:43 
Generalunknown mistake Pin
aguest5-May-03 12:34
aguest5-May-03 12:34 
GeneralRe: unknown mistake Pin
Baris Kurtlutepe5-May-03 12:38
Baris Kurtlutepe5-May-03 12:38 
GeneralRe: unknown mistake Pin
Wes Aday5-May-03 12:39
professionalWes Aday5-May-03 12:39 
GeneralRe: unknown mistake Pin
jhaga5-May-03 12:55
professionaljhaga5-May-03 12:55 
GeneralRe: unknown mistake Pin
aguest5-May-03 13:08
aguest5-May-03 13:08 
GeneralRe: unknown mistake Pin
aguest5-May-03 13:14
aguest5-May-03 13:14 
Generalanother problem Pin
aguest5-May-03 13:28
aguest5-May-03 13:28 
GeneralRe: another problem Pin
Chris Richardson6-May-03 5:16
Chris Richardson6-May-03 5:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.