I have created linklist using <list> STL. Now I want to push address of each node in Stack. For that I want address of 1st node so that I will assign it to "temp" and I can use following loop.
Expand|Select|Wrap|Line Numbers
- while (temp != NULL)
- {
- s.push(temp);
- temp = temp->next;
- }
Can anyone help me ?