+ 1
What is the meaning of this error??
I am creating an program for parenthesis matching in C using stack, but i am getting an error . https://code.sololearn.com/cPcXK5PIJoPY/?ref=app
3 ответов
+ 3
Rei ,you are absolutely right.
Vinayak Dutt , you are only declaring a pointer of type (struct stack), you have to make it point to something.
Here is the fix👇
https://code.sololearn.com/cQZfTWLQEFlq/?ref=app
+ 1
i'm not good with C but my guess is *sp is not pointing to any memory, so maybe do this
struct stack *sp = malloc(sizeof(struct stack));