home *** CD-ROM | disk | FTP | other *** search
/ Microsoftware Monthly 19…2 Programming Power Tools / MASO9512.ISO / cpptutor / cpptutor.arj / EXAMPLES / EX17014.H < prev    next >
Encoding:
C/C++ Source or Header  |  1993-10-27  |  1.5 KB  |  37 lines

  1. // \EXAMPLES\EX17014.H      - Iterator.H
  2.  
  3. //----------------------------------------------------------
  4. // Example of template container classes implenenting stacks.
  5. // This version includes exception handling and templates.
  6. //----------------------------------------------------------
  7. //----------------------------------------------------------
  8. //  Exception handling is supported only by
  9. //                      the IBM C++ Set/2 compiler
  10. //  Templates are not supported by
  11. //                      the Microcoft Visual C++ compiler
  12. //  Two versions of this program are included:
  13. //                      EX1701I.EXE - for IBM CSet II
  14. //                      EX1701B.EXE - for Borland Turbo C++
  15. //----------------------------------------------------------
  16. // Files in this example:
  17. // %F,15,EX17010.H%EX17010.H       Stack.H       base class stack
  18. // %F,15,EX17011.H%EX17011.H       AStack.H      derived array stack
  19. // %F,15,EX17011.CPP%EX17011.CPP     AStack.CPP
  20. // %F,15,EX17012.H%EX17012.H       LLStack.H     derived linked list stack
  21. // %F,15,EX17012.CPP%EX17012.CPP     LLStack.CPP
  22. // %F,15,EX17013.H%EX17013.H       Exception.H
  23. // EX17014.H       this file -- Iterator.H       iterator class
  24. // %F,15,EX1701.CPP%EX1701.CPP      main() with exception handling
  25. // %F,15,EX1701B.CPP%EX1701B.CPP     main() without exception handling
  26. //----------------------------------------------------------
  27. #ifndef INCL_EX17014
  28. #define INCL_EX17014
  29.  
  30. template <class T> class Iterator
  31. {
  32.    virtual T&
  33.    operator()() = 0;
  34. };
  35.  
  36. #endif
  37.