|
Printing File Data (Via a Printer)
I am currently making a program that will read information from a file, but, i would also like to allow the user to print the current record(s) from the file via a printer. How can this be done.
Many Thanks
Here's the coding i have so far:
Quote:
#include <iostream.h>
#include <fstream.h>
#include <ctype.h>
#include <conio.h>
#include <dos.h>
int main(void)
{
int id;
char name[50];
char next;
ifstream data (".\\data.txt");
do
{
clrscr();
data >> id;
data >> name;
cout << "ID: " << id << endl;
cout << "Name: " << name;
cout << "\n\nShow Next? Y/N: ";
cin >> next;
next = toupper (next);
} while (next == 'Y');
data.close();
return 0;
}
|
__________________
Many Thanks, in advance!
Salchester.
The Future Is Here - Are You Ready?
|