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

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(3C++)

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004