DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
An Objection Class for Rudimentary Error Handling - Objection(C++)

Objections for the Software Author

Our example library developer is the author of a fixed-size integer stack class called Stack. The contents of the header file for this class, Stack.h, are as follows:

   Stack.h:
    
      const int SIZE = 10;
      class Stack {
      public:
          Stack();
          void push(int);
          int pop();
          int top();
      private:
          int stack[SIZE];
          int size;
      };

The rest of this section illustrates how the library author can use Objections to implement simple error handling for the Stack library.


Next topic: Declaring and Instantiating Objections
Previous topic: An Objection Class for Rudimentary Error Handling - Objection(C++)

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005