Solved

Printing Data from Files in C / C++

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
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++.

744 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

13 Experts available now in Live!

Get 1:1 Help Now