I keep getting this error but I don't know how to fix it. show5.cpp(37): error C2039: 'showStructure' : is not a member of 'List<DataType>'
Any help is appreciated thank you.
Here is the first code that seems to have the error
//--------------------------------------------------------------------
// show5.cpp: includes implementation of showStructure
//--------------------------------------------------------------------
#include "ListLinked.h"
template <typename DataType>
void List<DataType>::showStructure() const
// Outputs the items in a list. If the list is empty, outputs
// "Empty list". This operation is intended for testing and
// debugging purposes only.
{
if ( isEmpty() )
{
cout << "Empty list" << endl;
}
else
{
for (ListNode* temp = head; temp != 0; temp = temp->next) {
if (temp == cursor) {
cout << "[";
}
// Assumes that dataItem can be printed via << because
// is is either primitive or operator<< is overloaded.
cout << temp->dataItem;
if (temp == cursor) {
cout << "]";
}
cout << " ";
}
cout << endl;
}
}
Here is the second code that seems to be effected by it that I had to work on myself.