I'm trying to make a linked list and attach its nodes as such:
Node *a,*b,*c,*d,*e,*f,*g = new Node();
a->data=1;
a->next=b;
b->data=2;
b->next=c;
This gives me a segfault at a->data = 1
What is wrong with this approach? The full code is here