Shoulda known I'd blow it again. So let's see if I get this straight, finally. (Well, at least 'til I try to work with C style lists or other intense uses of pointers).
if instead of this:
it had been this:
node * create_node()
node * top=new node;
top->next = NULL;
it would be an error since top_ptr is being re-directed. In this scenario you need to send top_ptr by reference as in this example:
void create_node(node * top_ptr)
top_ptr = new node;
top_ptr->next = NULL;
Returning a node pointer rather than using a node pointer as a parameter when trying to change the address in the pointer makes the syntax a little cleaner.
void create_node(node ** topPtr)
*topPtr = new node;
if(*topPtr == NULL)
(*topPtr)->next = NULL;
the node pointer is used to change the value at the address it is pointing to, not change the address the node is pointing to. Therefore, the pointer doesn't need to be passed by reference, it _is_ the "reference" used to change the value.
void input_data(node *node)