Hi,
If i have the following:
Code:
struct stackNode {
int data;
struct stackNode *nextPtr;
};
typedef struct stackNode StackNode;
typedef StackNode *StackNodePtr;
I know the 2nd last line is just to save some work when declaring variables with the type struct stackNode. But what's the last line for? Why has it got the asterisk there? Why make it a pointer. Note that i'm now learning linked lists, stacks and quese at the moment. ALso, can i reduce the last two lines with this:
Code:
typedef struct stackNode *StackNodePtr;
Is this the way to do it in one line what the 2 lines are doin?
many thnx