Solved

Printing Data from Files in C / C++

Posted on 2004-09-22
6
138 Views
Last Modified: 2010-04-01
Well I have created 2 files for dmmy project work. I want to print the records which are present in the files as requested by the user.  What command will help me print the record from the file to the printer?
It would be of great help if the help is from C point of view
Thanks
J2
0
Comment
Question by:coolguyj2
  • 2
6 Comments
 
LVL 30

Expert Comment

by:Axter
ID: 12123700
system("copy file.txt prn:");
0
 
LVL 30

Expert Comment

by:Axter
ID: 12123720
The above is a simple method for copying a file to a printer.

But a better answer can be provided if you give us more details of your requirements.

What OS?
What type of printer? (Printer connected to printer port or network printer)
0
 

Author Comment

by:coolguyj2
ID: 12132059
thanx for the reply...
actually, I am reading the file into an array and then will be splittin up array using sscanf()... now these details are displayed on  the screen. I want to print these details on the printer
How can I do it?
I am using Win XP... Printer is n/w printer... dunno all the details...
thanx
J2
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 12687937
PAQed with points refunded (125)

modulo
Community Support Moderator
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now