-
-
Save ibeauregard/747eb7d901de292704097e8d7edcc9ce to your computer and use it in GitHub Desktop.
Client cannot access struct int_stack's member
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* main.c */ | |
while (stack->top) { | |
printf("`%d` was popped from the stack\n", pop_stack(stack)); | |
} | |
// Output from the compiler: | |
main.c:11:17: error: incomplete definition of type 'struct int_stack' | |
while (stack->top) { | |
~~~~~^ | |
./int_stack.h:6:16: note: forward declaration of 'struct int_stack' | |
typedef struct int_stack IntStack; | |
^ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment