 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Richard Johnson Guest
|
Posted: Sat Feb 28, 2004 2:46 pm Post subject: How to send output to a local printer |
|
|
I am a C++ newbie and am trying to send simple text data to my local
printer. My printer is a USB printer and I have tried the following code
using my USB port. This code executes but does not send anything to the
printer. I have checked my printer ports and the name I have in the code is
the same as is listed on the printer port.The code is as follows:
file.open("USB-Compaq_A3000");
file << "Hello World" << std::endl;
file.close;
|
|
| Back to top |
|
 |
John Harrison Guest
|
Posted: Sat Feb 28, 2004 4:10 pm Post subject: Re: How to send output to a local printer |
|
|
"Richard Johnson" <rjohnson383 (AT) mchsi (DOT) com> wrote
| Quote: | I am a C++ newbie and am trying to send simple text data to my local
printer. My printer is a USB printer and I have tried the following code
using my USB port. This code executes but does not send anything to the
printer. I have checked my printer ports and the name I have in the code
is
the same as is listed on the printer port.The code is as follows:
file.open("USB-Compaq_A3000");
file << "Hello World" << std::endl;
file.close;
|
There is no standard way in C++ to access a printer. In any case these days
printers a sophisticated beasts and are unlikely to accept simple text
output, as you are attempting.
You need to ask this question on a group dedicated to programming whatever
operating system you are using, since it is via the operating system that
you access the printer. Have a look here for suggestions and general advice
on posting to comp.lang.c++.
http://www.slack.net/~shiva/welcome.txt
john
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|