GithubLinkhttps://github.com/leomdmfiel/Assignment/tree/master/BankManager/BankManager
First here’s my header:
class List
{
protected:
Node* head;
public:
List(object data);
void addNode(Node* headRef, object data);
void removeNode();
void showList(Node* headRef);
};
And here is the function showList
void List::showList(Node* headRef)
{ Node* current = headRef;
while (current != NULL)
{
cout << current->retrieveData();
current = current->retrieveNext();
}
}
For some reason at compile it keeps giving me the error error C2448: ‘List::showList’ : function-style initializer appears to be a function definition even though I’ve copied the declaration letter by letter. So I’m at a loss and looking for help.
Now that I’ve seen the code you have an extra semi-colon
should be
I would have expected a better error message though, I must admit.