could someone please show me how i would be able to reverse the printout of a linked list?, i have gotten it to print out in the right order but not sure how to make to printout in reverse.
here is my current code,
void print(node*& head)
{
node* temp;
temp = head;
while (temp != NULL)
{
cout << temp->base;
temp = temp->next;
}
}
at the moment the print function prints out whats in the linked list in the correct order, i want it to do it in reverse, please help