C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to send output to a local printer

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++)
View previous topic :: View next topic  
Author Message
Richard Johnson
Guest





PostPosted: Sat Feb 28, 2004 2:46 pm    Post subject: How to send output to a local printer Reply with 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;


Back to top
John Harrison
Guest





PostPosted: Sat Feb 28, 2004 4:10 pm    Post subject: Re: How to send output to a local printer Reply with quote




"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
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.