|
Re: Static Variables
Quote:
|
Originally Posted by MikeWasHere05
Declare it at the top of a file, then in other files put
at the top.
|
So basically like this.
MyFunction.c
void declarations(void)
{
int bob=2;
}
void hi(void)
{
int bill=0;
extern int bob;
bill=bob+2
}
I need to define a variable in a function and make it available to everywhere in the rest of the file.
__________________
I quit FRC over 2 years ago (more if you're reading this past 2010).
Last edited by amateurrobotguy : 02-03-2005 at 19:05.
|