This is the first time I've used extern variables so I may be doing something wrong. I have a 4 program file with a header file "hotel.h". In hotel.h I have the following:
Code:
#define NLINE 41
#define MAXROOM 10
extern int fd;
extern char[NLINE];
When I try to compile this (on Linux) I get errors saying there are undefined reference to each place I tried to use either of the extern variables. I tried putting these in the main file before the main function and still got errors. Any ideas?