Redirection to Printer from Visual C++

In Turbo C, you could type, "go.exe >prn" and the output would go to the printer.  Is there any way to do this is Visual C++ 5.0?  Thanks.
LClosAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

LClosAuthor Commented:
Adjusted points to 100
0
nietodCommented:
Try entering the "> prn" as if it were part of the program's argument.  You do this in the program settings, under the debug tab, in the program arguments box.
0
q2guoCommented:
Or you can open 'prn' in your program as an output stream, and redirect all the stdout to it.
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

nietodCommented:
q2quo, I suspect that LCLos wants a method that can be used for testing, not a method that requires altering the program.   However, that might not be possible and you method might be it.
0
mikeblasCommented:
Redirection works from the command line for apps built with VC++ 5.0 just like it does in Turbo C++.  That is, if you build for /SUBSYSTEM:CONSOLE, stdout can be redirected just the way you describe.

.B ekiM
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
nietodCommented:
Mike, I believe what LCLos wants to do is be able to run the program from within VC (under the debugger etc) but have the ouput redirected.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.