Link to home
Start Free TrialLog in
Avatar of trip42
trip42

asked on

Network Printers

Ok, I was asked this question and I didn't know the answer.  How do you print to a network printer using ostream?

This code works:
#include<fstream.h>
int main()
{
        ofstream printer ("prn");
        printer << "This line is on the printer\n";
        return 0;
}

works OK if the printer is attached to LPT1, but does not print on the
network printer
\\wchs\hp4000_wchs_g129

Thanks for your help
ASKER CERTIFIED SOLUTION
Avatar of nietod
nietod

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial