• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 244
  • Last Modified:

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.
0
LClos
Asked:
LClos
1 Solution
 
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
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
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
 
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

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now