home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / VSCPPv7.zip / VACPP / IBMCPP / tutorial / ICLCC / TUTOR4 / EXAMPLE4.CPP next >
Text File  |  1995-05-10  |  970b  |  44 lines

  1. /*************************************************************************
  2.  
  3.  IBM(R) VisualAge(TM) C++ for OS/2(R), Version 3
  4.   - Collection Class Library -
  5.  
  6.  (C) Copyright IBM Corp. 1991, 1995.
  7.   - Licensed Material - Program-Property of IBM - All Rights Reserved.
  8.  
  9.  *************************************************************************/
  10.  
  11. #include <iglobals.h>
  12. #include <person4.h>
  13. #include <iostream.h>
  14.  
  15. #include <iseq.h>
  16. typedef ISequence <Person>  People;
  17.  
  18. int main ()
  19. {
  20.   People people;
  21.  
  22.   ...
  23.   {
  24.     people.add("J. Uhl");
  25.     people.add("K. Liegert");
  26.     people.add("M. Blum");
  27.     people.add("T. Wappler");
  28.     people.add("F. Seliger");
  29.     people.add("S. Hartig");
  30.     people.add("B. Proske");
  31.     people.add("C. Ludwig");
  32.     people.add("A. Wessling");
  33.  
  34.     people.addAtPosition (100,"K. Liegert");
  35.   }
  36.   ..... (.......... & exception)
  37.   {
  38.     cout << exception.name () << endl;
  39.     return 1;
  40.   }
  41.  
  42.   return 0;
  43. }
  44.