I wonder, what is the difference between:
struct Node
{
int data;
Node *next;
};
and
struct Node
{
int data;
struct Node *next;
};
Why do we need struct
keyword in second example?
Also, what is the difference between
void Foo(Node* head)
{
Node* cur = head;
//....
}
and
void Foo(struct Node* head)
{
struct Node* cur = head;
//....
}