Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » 4 assorted questions

This thread is locked; no one can reply to it. rss feed Print
 1   2 
4 assorted questions
CGamesPlay
Member #2,559
July 2002
avatar

Yes. That's why you put "extern" in front of them. It tells the compiler "this variable is defined someplace other than this line". The compiler then realizes that it is a variable of the given type, so you can use it, but the compiler doesn't allocate any space for it, because you told it not to. Understand?

Functions, by default, are already "extern". If you wanted to be more explicit, you could write "extern" in front of your declarations to help you understand, but no one does this ;)

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

 1   2 


Go to: