home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 10 / ioProg_10.iso / soft / optima / samples.z / EXCEPTN.HPP < prev    next >
Encoding:
C/C++ Source or Header  |  1996-04-17  |  387 b   |  20 lines

  1. // EXCEPTN.HPP
  2. // C++ program that illustrates throwing
  3. // and catching of exceptions
  4.  
  5. #include <iostream.h>
  6. #include <iomanip.h>
  7.  
  8. // handles negative number exceptions
  9. class negativeNumberException {};
  10.  
  11. // handles numbers greater than 99
  12. class largeIntegerException
  13. {
  14.   public:
  15.     largeIntegerException(int number)
  16.       { theValue = number; }
  17.     int theValue;
  18. };
  19.  
  20.