Hi,
I'm new to this so I'm going to be direct. I'm having trouble with custom template of a Linked List. I've created a Linked List with a reference from a book but I'm at a lost when I store in objects. How do I get the object's data members when I traverse the list of objects.
Here is my template code for display.
Code:
template<class TYPE>
struct linkNode
{
TYPE data;
linkNode* next;
};
template<class TYPE>
void t_List<TYPE>::display()
{
linkNode<TYPE>* current = first;
while (current != NULL)
{
cout << endl << current->data;
current = current->next;
}
}