Quote:
|
Originally Posted by The Lucas
just put:
Code:
extern char counter;
in your header file (user_routines.h). This will make counter a global varable that stays in memory
|
never put the keyword "extern" in a header file - the whole point of extern is that it points to a variable declared in another file. If you put the "extern"-ed variable declaration in the header file, you'll either have two definitions of the variable, or no definition without "extern" (you always have to have one without extern).
just put "extern" variable declarations at the beginning of an individual file.