Trees

Why can I call the array inside of my main function;

struct Node
{
int data[3][3];
Node* next;
}

main ()
{
Node *head;
head->data[0][1] = 5;
}
You need to allocate memory with new.
Node *head = new Node;
Topic archived. No new replies allowed.