home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Supreme Volume 6 #1
/
swsii.zip
/
swsii
/
099
/
IOSTREAM.ZIP
/
EX_F06.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1993-01-07
|
359b
|
24 lines
// EXAMPLE FILEIO-06
// HOW TO PRINT FROM WITHIN A
// PROGRAM
#include <header.h>
int main()
{
ofstream printer ;
// "prn" is the DOS printer
printer.open("prn") ;
if (!printer)
{
cerr << "Can't open\n" ;
exit(1) ;
}
printer << "This line appears"
<< " on the printer\n" ;
return 0 ;
}