Printing from Visual C++ output

  • Thread starter Freyster98
  • Start date
  • #1
49
0
I need to be able to print the output from my c++ program, which obviously comes up in a dos screen. Is there an easy way to print this without writing it into the code? Any help would be greatly appreciated.
 

Answers and Replies

  • #2
mgb_phys
Science Advisor
Homework Helper
7,819
14
myprogram.exe > result.txt
print result.txt or double click on result.txt and select print
 
  • #3
49
0
myprogram.exe > result.txt
print result.txt or double click on result.txt and select print

excellent, thanks!
 
  • #4
Borek
Mentor
28,822
3,340
IIRC in good ole times it was something like myprogram.exe > prn or myprogram.exe > lpt1. No idea if it works in dosbox.
 
  • #5
mgb_phys
Science Advisor
Homework Helper
7,819
14
Not directly (at least for most simple laser printers)
You can share the regular system printer using network shares and then connect lpt1 to that printer.
eg.
net use lpt1: \\mymachine\myprinter

You can then print directly to lpt1: even if it is a gdi/winlaser on a usb port.
 

Related Threads on Printing from Visual C++ output

Replies
36
Views
33K
  • Last Post
Replies
13
Views
5K
  • Last Post
Replies
2
Views
11K
Replies
3
Views
3K
  • Last Post
Replies
5
Views
5K
Replies
2
Views
6K
Replies
7
Views
1K
  • Last Post
Replies
2
Views
2K
Replies
3
Views
5K
  • Last Post
Replies
13
Views
3K
B
Top