Sign in to follow this  
Guest Patrick_Waugh

Why did Arne make these extern?

Recommended Posts

I notice that in one of his sample codes (registration.c) Arne did this:extern PELEMENT_HEADER C_GAUGE(list);extern MOUSERECT C_GAUGE(mouse_rect)[];Now, I understand his use of the C_GAUGE macros (which are very cool to make things easy to template), although now there is a C_PLIST() macro that might be more appropriate for PLIST stuff, but I'm wondering why the heck he wanted/needed external linkage.Anyone have any idea why?

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

look a bit more closely at it all... you might notice the circular reference... ;)

Share this post


Link to post
Share on other sites

>look a bit more closely at it all... you might notice the>circular reference... ;)It has nothing to do with forward declarations, just internal vs. external linkage.Anyway, I removed the need for all the forward declarations.So, the question remains, why did he use external declarations... and I guess the answer is, that he might have wanted access from another file.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this