Your browser does not seem to support CSS. If images appear below, please disregard them.
It appears that you're running an Ad-Blocker. This site is monetized by Advertising and by User Donations; we ask that if you find this site helpful that you whitelist us in your Ad-Blocker, or make a Donation to help aid in operating costs.
Previous Thread
Next Thread
Print Thread
Rate This Thread
#17238 - 01/01/04 06:07 AM extern in cpp  
Joined: Dec 2003
Posts: 38
acid45 Offline
Junior Member
acid45  Offline
Junior Member

Joined: Dec 2003
Posts: 38
canada
When using the extern is it similar to the define funtion only the extern's first variable is the variable already declared in a headerfile included above and the second part is the new name for easier codding of newer objects and things like that.
The first time I saw it all it said was:
Code:
 extern C {
I had no idea, and still don't what this did. While looking at some direct draw I saw some variables like:
Code:
extern DDRAWSURFACEDESC ddsd;
I looked in the ddraw.h file and found that so I think I am correct in what extern does, in part anyway.

PS: I think I may have a keylogger of some sort, I don't think it is activly sending information but it is fairly annoying that everytime I hit enter I lose the focus of ALL windows, even full screen games. I don't see any unusual activity but I'd like to get rid of this annoyance.

Sponsored Links
#17239 - 01/01/04 10:51 PM Re: extern in cpp  
Joined: Mar 2002
Posts: 197
Predator Offline
Member
Predator  Offline
Member

Joined: Mar 2002
Posts: 197
Belgium
Global variables are available to all parts of the program. If the existence of a global variable in one file is declared using the extern keyword in another file, the data is available for use by the second file.


Never argue with fools... They will only drag you down to their level, and beat you with experience...
#17240 - 01/04/04 06:10 AM Re: extern in cpp  
Joined: Dec 2003
Posts: 38
acid45 Offline
Junior Member
acid45  Offline
Junior Member

Joined: Dec 2003
Posts: 38
canada
So extern is used to use global variables in more than one program from a single file: IE header files?

#17241 - 01/08/04 05:00 AM Re: extern in cpp  
Joined: Mar 2002
Posts: 1,273
SilentRage Offline
DollarDNS Owner
SilentRage  Offline
DollarDNS Owner

Joined: Mar 2002
Posts: 1,273
OH, USA
extern is used to use global variables IN one program that consists of more than one .C or .CPP file.


Domain Registration, Hosting, Management
http://www.dollardns.net
#17242 - 01/26/04 02:41 PM Re: extern in cpp  
Joined: Jan 2004
Posts: 1
raquel Offline
Junior Member
raquel  Offline
Junior Member

Joined: Jan 2004
Posts: 1
philippines
hi guys im new here


Sponsored Links

Member Spotlight
Gremelin
Gremelin
Portland, OR; USA
Posts: 7,195
Joined: February 2002
Show All Member Profiles 
Forum Statistics
Forums45
Topics46,824
Posts81,994
Average Daily Posts10
Members2,159
Most Online1,567
Apr 25th, 2010
Latest Postings
Top Posters(All Time)
UGN Security 39,988
Gremelin 7,195
§intå× 3,255
SilentRage 1,273
Ice 1,146
pergesu 1,136
Infinite 1,041
jonconley 955
Girlie 908
unreal 860
Top Liked Users (All Time)
§intå× Likes: 1
Cold Sunn Likes: 1
Crime Likes: 1
Cyrez Likes: 1
Ghost Likes: 1
Gremelin Likes: 4
Ice Likes: 1
unreal Likes: 1
Top Liked Users (30 Days)
No Data Found
Powered by UBB.threads™ PHP Forum Software 7.6.0
(Snapshot build 20160902)