Posted on 1998-05-07
If there are 5 .c (source) files and a .h (header) file all to be used in one program, and each .c file will be using int a, char *string, and Struct mystruct, how can these variables be declared in the header file so that each can be used in all 5 .c files?
Can each variable be declared in the header file using 'extern' and
can the definition for each be placed in the file which contains main(), thus
using the variables in all files?