Mail Archives: djgpp/1998/01/14/13:03:35
>Could someone help with with showing me how to do some somple printing
>ruitines? I would assume that use bios_print(), but I am not sure, or
is
>there an easier way to redirect stdout to the printer or buffer
temporarily
>so I can do something like cout << data; and have it go to the
>printer/buffer?
>
>The printing I am trying to do is a simple text only type printing, so
I
>don't need any special formatting.
>
>
>Thanks,
>
>Joe Davidson
>
If your familiar with fstream classes and the derived
fstream classes:
//file: mytest.cc
#include <fstream.h>
int main()
{
ofstream pout("LPT1");
pout << "Test\n";
return 0;
}
NOTE: the page is printed out right away because
the ofstream object is destroyed clearing the
printer buffer... You need to manually send a
form feed to make this happen in your program.
I'm not 100% on all the details, but that's my
take on it.
HTH,
Johnny P.
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
- Raw text -