In
display(front)
you haven't declared a type for
front
, so the compiler assumes it is an
int
. You can't then expect it to behave as a pointer on the left side of
->
. What you need is to replace that line with
display(struct node *front)
Then either of your
printf()
calls will compile.
Peter