accessing printer stream in c++ for windows
Posted on 1997-01-30
I've got what's probably a really easy question,
but I can't seem to find an answer in several different
books...can someone tell me how to send a stream to the
printer in borland c++ for windows?
#define printer "LPT1"
#define printer "PRN"
#define printer "PRN:LPT1"
outf.open(printer); c++ seems to recognize PRN and LPT1 as valid
outf <<... constants--no errors on run
but output is sent to screen(window).
the text says that stdio.h has a stream called stdprn
and i've tried to use
fprintf(stdprn,"this is a test");
just to try that, and it goes to screen also.
The least capability I need is to be able to create a file then
print hard copy from within the program...I would like to be able
to send individual lines to printer for headers or summary that I
don't want in the actual file.
Pardon me if I've missed something obvious.....
BTW this is windows 3.11 and borland c++4.52 (I also have turboc++3.1)
thanks in advance