I want to write a function to add nodes to the end of my linked list. My problem is that I don't know how I can have a pointer that always points to the first node of my linked list.Forexample if I write
Gnode*p = new Gnode;
first->link=p;
when I add the first node it works but for adding more than one it causes problem.