Hi all
I'm doing my first steps in C and I need some help plz.
I have 2 structs, a node* and a stack*. I want to write a push() function that accepts to arguments, the node to insert and the pointer to the the top of the stack.
This way it works without problems: push(node *theNode, stack *theStack)
The call looks like that: push(newNode, newStack) and inside the function I can access the pointer with newStack->head.
I tried doing it this way: push(node *theNode, node *topNode) and call it like that: push(newNode, newStack->head) but it doesn't work(also tried using brackets etc).
What am I doing wrong?
Hope my question is clear enough.
Thank you in advance for your help
Minas