D
dohboy
Hi,
I'm having a problem getting a program to print to my inkjet. I've tried addressing with lpt1, PRN and even USB001. It just doesn't seem to find it's way to the printer. Here's the code:
#include <iostream.h>
#include <fstream.h>
int main(void)
{
int x = 65534;
const double f = 3.1415;
char somename[10];
ofstream printer;
printer.open("USB001");
if (!printer) {
cout << "There is something dodgey with the printer.\n";
return 0;
}
cout<<"Enter a word (Max 9 chars): ";
cin.getline(somename,9, '\n');
printer << "The values are: " << x <<"\n" << f << "\n" << somename <<endl;
printer.close();
return 0;
}
Any ideas, anyone?
TIA
-doh
"Ooh! sensory depravation kicks ass! "
-The Prophet Homer
I'm having a problem getting a program to print to my inkjet. I've tried addressing with lpt1, PRN and even USB001. It just doesn't seem to find it's way to the printer. Here's the code:
#include <iostream.h>
#include <fstream.h>
int main(void)
{
int x = 65534;
const double f = 3.1415;
char somename[10];
ofstream printer;
printer.open("USB001");
if (!printer) {
cout << "There is something dodgey with the printer.\n";
return 0;
}
cout<<"Enter a word (Max 9 chars): ";
cin.getline(somename,9, '\n');
printer << "The values are: " << x <<"\n" << f << "\n" << somename <<endl;
printer.close();
return 0;
}
Any ideas, anyone?
TIA
-doh
"Ooh! sensory depravation kicks ass! "
-The Prophet Homer