home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_144 / 8.ddi / IOSTRSR1.ZIP / OSRCTR1.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-10  |  1.3 KB  |  39 lines

  1. /*[]------------------------------------------------------------[]*/
  2. /*|                                                              |*/
  3. /*|     osrctr1.cpp                                              |*/
  4. /*|                                                              |*/
  5. /*|     Class ostrstream                                         |*/
  6. /*|          ostrstream::ostrstream( char *, int, int )          |*/
  7. /*|                                                              |*/
  8. /*[]------------------------------------------------------------[]*/
  9.  
  10. /*
  11.  *      C/C++ Run Time Library - Version 5.0
  12.  *
  13.  *      Copyright (c) 1990, 1992 by Borland International
  14.  *      All Rights Reserved.
  15.  *
  16.  */
  17.  
  18. #include <ioconfig.h>
  19. #include <strstrea.h>
  20. #include <string.h>
  21.  
  22. ostrstream::ostrstream(signed char* str, int len, int omode) :
  23.         strstreambase(str, len, str),
  24.         ostream(strstreambase::rdbuf())
  25. {
  26.     if( omode & (ios::ate | ios::app) )
  27.     strstreambase::rdbuf()->seekoff(strlen(str), ios::beg, ios::out);
  28. }
  29.  
  30. ostrstream::ostrstream(unsigned char* str, int len, int omode) :
  31.         strstreambase((signed char *)str, len, (signed char *)str),
  32.         ostream(strstreambase::rdbuf())
  33. {
  34.     if( omode & (ios::ate | ios::app) )
  35.     strstreambase::rdbuf()->seekoff(strlen(str), ios::beg, ios::out);
  36. }
  37.  
  38.  
  39.