home *** CD-ROM | disk | FTP | other *** search
/ Microsoftware Monthly 19…2 Programming Power Tools / MASO9512.ISO / cpptutor / cpptutor.arj / CH13 / A13147.TXT < prev    next >
Encoding:
Text File  |  1993-09-21  |  452 b   |  9 lines

  1. Here we can see the real benefit of using abstract base classes
  2. and inheritance.  In this example, the client code in useStack()
  3. takes a Stack object as an argument and performs various
  4. manipulations on it.  The client code does not have to know about
  5. the implementation used.  You could define a new class that
  6. implements stacks as doubly-linked lists, for example, and
  7. useStack() could accept objects of this class without any
  8. modifications.
  9.