home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / IDIOMS.ZIP / 3-10.H < prev    next >
C/C++ Source or Header  |  1991-12-04  |  539b  |  26 lines

  1. /* Copyright (c) 1992 by AT&T Bell Laboratories. */
  2. /* Advanced C++ Programming Styles and Idioms */
  3. /* James O. Coplien */
  4. /* All rights reserved. */
  5.  
  6. #include <stdlib.h>
  7. #include <string.h>
  8.  
  9. class String;
  10.  
  11. class StringRep {
  12. friend String;
  13. private:
  14.     StringRep();
  15.     StringRep(const StringRep& s);
  16.     ~StringRep();
  17.     StringRep(const char *s);
  18.     String operator+(const String&) const;
  19.     int length() const;
  20.     void print() const;
  21. private:
  22.     StringRep(char** const r);
  23.     char *rep;
  24.     int count;
  25. };
  26.