#include #include using namespace std; class IntList{ public: /* IntList() { TERMINATOR=-1; //THIS IS NOT ALLOWED.. const member variable should be initialized, not assigned } */ //Default value for the parameter. So this constructor can be used when no parameter is given IntList(int t=-1):TERMINATOR(t) { cout <<"Called\n"; array[0]=TERMINATOR; counter++; } //Destructor ~IntList() { cout <<"destructor called\n"; counter--; } /* void SetTER (int t){ TERMINATOR = t; //CANNOT ASSIGN to a const member variable } */ void push_back( int value) { // look for the end of the array int i=0; while (array[i]!=TERMINATOR) i++; if (i==SIZE-1) { //For now: just exit the program //Will learn exception throwing... cout <<"Attempt to insert into an IntList that is full!\n"; exit(1); } array[i] = value; array[i+1] = TERMINATOR; } void Output() { cout <<"IntList object: "<