My code is spread out over several .c files and their respective header files. I have one header file (without a .c file), which contains the definitions of some variables I wish to use in all other .c files.
In the main I wish to give these variables values.
How can I do this, so that all the other .c files will use the updated versions of the variables?
So in this header file I have something like:
double x ;
In the main I want to do something like x = 2, and make sure all the other .c files that included the header, use x=2.