I've got a linked list template that's similar to this:
template<class T>
class List{
private:
struct Node{
T data;
Node* next;
Node* previous;
};
public: // List interface goes here
};
I'm getting an error when passing a specific list type as a parameter instead of just the generic linkedlist, which worked previously.
This is the error I'm receiving, which doesn't make much sense to me. By my understanding, I'm passing the list to the function with the right pointer format:
asn2.cpp: In function `int main()':
asn2.cpp:424: no matching function for call to `display_mainmenu (LinkedList<Person> *&)'
Here's my function definition:
void display_mainmenu(LinkedList<Person> *dir);
And here's the code that's giving the problem:
int main(){
LinkedList<Person> *directory;
display_mainmenu(directory);
return 0;
}
I'm getting frustrated... once I get this working smoothly, the rest of the project will be a breeze.
Any pointers would be appreciated