|
Re: Using vars across multiple .c files
define the var as:
extern mytype myvar;
in each file accessing it, except one.
Then, in ONLY ONE file (the only without an extern declaration), declare the variable normally:
mytype myvar;
See http://www.crasseux.com/books/ctutor...variables.html
Last edited by Jared Russell : 01-02-2006 at 22:17.
|