|
||
|
GP Mailing List
ATXGPSIG List
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: MSVC++ 6.0
If you use the extern keyword, the linker searches (or is it the
compiler???) throughout the program, not just the source file. If you
wanted to include it, you could, but you could make it more modular with the
extern keyword, i.e. you don't have to worry about EVERYTHING in the
included file, only that one function you said was external. Does this make
sense, or not?
>From: Kline Family <dmkline@earthlink.net>
>Reply-To: gameprogrammer@gameprogrammer.com
>To: gameprogrammer@gameprogrammer.com
>Subject: Re: MSVC++ 6.0
>Date: Wed, 02 Aug 2000 14:03:41 -0700
>
>Hey Frag. Just had a question about this. You mention you don't have to use
>#include. Why is this? Will it work with #include? Or does it require
>#include
>to not be there. It seems to me that extern and include are almost two
>sides of
>the same coin; include is used to reference data type declarations and
>extern is
>used to reference data type definitions. Is that the case?
>
>SirFern
>
>Frag_ Daddy wrote:
>
> > Use the extern keyword. I'll give you an example. Say you want to
> > call a function that's declared like this.
> >
> > void SomeFunction();
> >
> > In the other source file that you want it in, you'd declare it like
> > this, without including anything!
> >
> > extern void SomeFunction();
> >
> > You can now call this function normally, and it will work if it's
> > defined (not just declared) in the other source file.
>
>=================================================================
>The GameProgrammer.Com mailing list is for the open discussion
>of any topic related to the art, science, and business of
>programming games. This list is especially tolerant of beginners.
>We were all beginners once
>
>To SUBSCRIBE or UNSUBSCꫨ please visit:
>http://gameprogrammer.com/mailinglist.html
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
=================================================================
The GameProgrammer.Com mailing list is for the open discussion
of any topic related to the art, science, and business of
programming games. This list is especially tolerant of beginners.
We were all beginners once
To SUBSCRIBE or UNSUBSCꫨ please visit:
http://gameprogrammer.com/mailinglist.html
|
|