Solved

Printing Data from Files in C / C++

Posted on 2004-09-22
6
140 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

828 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