I get a weeeird error when defining my destructor, it uses another function Purge() to accomplish the job..
Here is the error..Code:template <class T> // LinkedList Member Function, cleans up List Elements, Purges them void LinkedList<T>::Purge() { while (head != 0) { ListElement<T>* const tmp = head; head = head->next; delete tmp; } tail = 0; } template <class T> // Destructor, uses purge! void LinkedList<T>::~LinkedList() { Purge (); }
What do I do?Code:c:\documents and settings\jonathan\my documents\c++ programming\opengl with nehe\nehe tutorials\tutorials databasing\single_linked_list.h(82) : error C2631: 'LinkedList<T>::~LinkedList<T>' : destructors not allowed a return type



LinkBack URL
About LinkBacks




tr_vector for this kind of "container of new'd objects". it'll make your life easier
Want to add some