// File: intcell.C // // Implementation of the IntCell class #include #include #include #include "intcell.h" //======================================================================== // "Local" functions // static void CrashOnNULL(void *, char *) ; static void CrashOnNULL(void *ptr, char *mesg) { if (ptr == NULL) { cerr << "CrashOnNULL: " << mesg <data) return -1 ; if (data == iptr->data) return 0 ; return 1 ; } // print an int, virtual. // void IntCell::print() const { #ifndef NDEBUG cerr << "IntCell: print function" << endl ; #endif cout << data << " " ; } // return address of idvar. // int *IntCell::id() const { #ifndef NDEBUG cerr << "IntCell: id function" << endl ; #endif return &IntCell::idvar ; }