How to traverse template class element

  • Thread starter Thread starter Jeff0803
  • Start date Start date
J

Jeff0803

Guest
I'm making a template class of Linked List like following.

template <typename T>
class Node {
public:
T data;
Node* next;

};


I want to add a printList function which prints all data of the linked list.

How to do it?

Continue reading...
 
Back
Top