Hi I have code something like
in hello.h #ifndef _HELLO_H #define _HELLO_H
#define S16 signed short int #define S8 signed char
typedef struct player { int x; int y; int score; }; extern player pacman;
#endif /* HELLO_H */
In hello.c #include "hello.h" void main (void) { /* execution starts here */
player pacman; pacman.score = 100;
}
When I am trying to compile I am getting error: HELLO.H(13): warning C34: 'pacman': missing declaration specifiers HELLO.H(13): error C42: 'pacman': not in formal parameter list
why I can't use "player" as user defined type although I declared typedef struct player.
I have intenstion to creat global instances of player in *.c file and declaring them as extern user defined variable in *.h file.