View Single Post
  #2   Spotlight this post!  
Unread 17-01-2004, 08:06
m0rph3us's Avatar
m0rph3us m0rph3us is offline
Registered User
AKA: Andre
#0293 (Spike)
Team Role: Programmer
 
Join Date: Feb 2003
Location: Hopewell, NJ
Posts: 32
m0rph3us will become famous soon enough
Send a message via ICQ to m0rph3us Send a message via AIM to m0rph3us Send a message via MSN to m0rph3us Send a message via Yahoo to m0rph3us
Re: Using the extern keyword.

Yes the you can use the keyword extern like the following:

Code:
//user_routines_fast.c
int foo;
...


//user_routines.c
extern int foo;

void test()
{
foo=2;
}
But the more professional way of doing this is by declaring the variable in user_routines.h where than you don't have to use extern but rather only have to include the file user_routines.h (as it is already done in the default code)
__________________
Andre
Team S.P.I.K.E.293