Write a templated List class with the following public methods:
itemType* getFirst();Hint: be sure to delete m_pFirst and m_pRest in your destructor, but nowhere else.
void setFirst(itemType* pFirst);
List<itemType>* getRest();
void setRest(List<itemType>* pRest);
Write a main() which demonstrates this by creating either an apstring or an int version of List, and then exhibiting the following behavior:
List of [s]trings or [i]ntegers: sGood luck!
Command (push, pop, or quit): push foo
List = ( foo )
Command (push, pop, or quit): push bar
List = ( bar foo )
Command (push, pop, or quit): pop
Popped: bar
List = ( foo )
Command (push, pop, or quit): push blat
List = ( blat foo )
Command (push, pop, or quit): pop
Popped: blat
List = ( foo )
Command (push, pop, or quit): pop
Popped: foo
List = ( )
Command (push, pop, or quit): quit
Good bye.