// File: stringcell.C // // Implementation of the StringCell class #include #include #include #include "stringcell.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 == sptr->data) return 0 ; return 1 ; } // print a string, virtually // void StringCell::print() const { #ifndef NDEBUG cerr << "StringCell: print function" << endl ; #endif cout << data << " " ; } // Return &idvar for id purposes // int *StringCell::id() const { #ifndef NDEBUG cerr << "StringCell: id function" << endl ; #endif return &StringCell::idvar ; }