Go to Post We design for being on a dysfunctional alliance: all the time. - boomergeek [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Spotlight this post!  
Unread 18-01-2004, 02:08
deltacoder1020's Avatar
deltacoder1020 deltacoder1020 is offline
Computer Guy
AKA: Dav
#1020 (The Indiana Prank Monkeys)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Muncie, Indiana
Posts: 340
deltacoder1020 has a spectacular aura aboutdeltacoder1020 has a spectacular aura about
Send a message via AIM to deltacoder1020
Re: Using the extern keyword.

extern is only used in the first declaration of variable in a file - treat it just as if you were declaring the variable normally, extern just says "this variable was originally declared in another file, and the same copy should be used here".

also, remember that exactly one file should have the variable declared without "extern" - all of the other files extern this original declaration.

Finally, remember that extern only really works for global variables. So make sure your extern-ed variables are declared outside of any function calls.

--edit-- lol, it happened again.
__________________
Team 1020, the Indiana Prank Monkeys (www.team1020.org)
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 19:56.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi