![]() |
Stupid Variable question....
I have a stupid question about my code that just wont work..........
In all my code I've always setup the variables I need in user_routines_fast.c for auto, and user_routines.c for the main. Now I want to use the same variable in both files, how could I go about doing this? Thanks |
Re: Stupid Variable question....
Quote:
Code:
user_SerialDrv.c:55: unsigned char aBreakerWasTripped; // Creates the variable. |
Re: Stupid Variable question....
Or, you can keep the variables in their files and add a definition in user_routines.h
example: Code:
#define LEFT p1_y |
Re: Stupid Variable question....
Typically the extern is put in a .h file that is included in all the .c files you want to use it in.
|
| All times are GMT -5. The time now is 19:27. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi