cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Printing a file
Printing a file
Apr 23, 2010 at 4:17pm UTC
dwinters
(22)
I am writing a program where I want it to automatically print some reports that I'm generating. Is there a simple way to send a file to the printer to print in C++?
Apr 23, 2010 at 4:19pm UTC
Albatross
(4553)
Try an infinite loop that terminates when istream receives an EOF.
istream would store the data in a string, which would be printed by cout in that loop.
EDIT: Any simpler than that, and I'd have to brush up on my iostream.
-Albatross
Last edited on
Apr 23, 2010 at 4:19pm UTC
Apr 23, 2010 at 4:32pm UTC
dwinters
(22)
No, I want to take a created file and output it to a printer to create a hard copy of the file.
Topic archived. No new replies allowed.