next up previous contents
Next: integer_base Class Variables Up: The Type Base Classes Previous: The Type Base Classes

The Integer Base Class

The integer base class includes a single member variable which stores the actual data value.

Example:

class integer_base {
  public:
   int value;
   integer_base(int a) { value = a; };
   integer_base(const integer_base &a) { value = a.value; };
   integer_base &operator=(const integer_base a) {
      value = a.value;
      return *this;
   }
   operator int() const { return value; }
};



 


1998-11-17