// File: record.C // #include #include #include "record.h" Record::Record() { // Default Constructor printf("Default Constructor: this=%p\n", this) ; field1 = 1 ; field2 = 'x' ; } Record::Record(int n, char c) { // Alternate Constructor printf("Alternate Constructor: this=%p, field1=%d, field2='%c'\n", this, n, c) ; field1 = n ; field2 = c ; } Record::~Record() { // Destructor // nothing needs to be done. printf("Destructor: this=%p, field1=%d, field2='%c'\n", this, field1, field2) ; } void Record::id() { printf ("id: this=%p, field1=%d, field2='%c'\n", this, field1, field2) ; }