|
Re: Syntax Error!
#define is for CONSTANTS - you want to use a variable such as int or float.
Constants get their value once - you cannot assign them a new one.
Since you seem to be using this data in multiple C files, here is what you need to do:
in tracking.h:
extern int distance_from_wall;
in tracking.c, in the global space (top of file, not inside a function):
int distance_from_wall = 0;
Now your code will work the way you expect.
Last edited by Jared Russell : 03-02-2006 at 15:38.
|