home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR13 / TI_BC1.ZIP / TI1565.ZIP / TI1565.ASC
Text File  |  1993-10-06  |  978b  |  67 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.   PRODUCT  :  Borland C++                           NUMBER  :  1565
  9.   VERSION  :  All
  10.        OS  :  All
  11.      DATE  :  October 6, 1993                          PAGE  :  1/1
  12.  
  13.     TITLE  :  Creating a C++ stream to output to the printer
  14.  
  15.  
  16.  
  17.  
  18.   //--------------------------------------------------------------
  19.   //
  20.   // Here is sample source for creating cprn, a C++ stream
  21.   // attached to stdprn (i.e. file handle 4 )
  22.   //
  23.   //--------------------------------------------------------------
  24.  
  25.   #include <fstream.h>
  26.  
  27.   char *prnbuff = new char[1024];
  28.   ofstream cprn( 4, prnbuff, 1024 );
  29.  
  30.   int main(void)
  31.      {
  32.      cprn << "Hello world." << endl;
  33.      return 0;
  34.      }
  35.  
  36.  
  37.   DISCLAIMER: You have the right to use this technical information
  38.   subject to the terms of the No-Nonsense License Statement that
  39.   you received with the Borland product to which this information
  40.   pertains.
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.