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

  1. // \EXAMPLES\EX17013.H      - Exception.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. // EX17013.H       this file -- Exception.H
  23. // %F,15,EX17014.H%EX17014.H       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_EX17013_H
  28. #define INCL_EX17013_H
  29.  
  30. class Exception
  31. {
  32.    virtual char*
  33.    Name() const = 0;
  34.  
  35.    virtual long
  36.    ErrorNum() const = 0;
  37. };
  38.  
  39. #endif
  40.