Previous Thread
Next Thread
Print Thread
Rate Thread
#17238 12/31/03 11:07 PM
Joined: Dec 2003
Posts: 38
Junior Member
Junior Member
Joined: Dec 2003
Posts: 38
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
▼ Sponsored Links ▼ ▲ Sponsored Links ▲
#17239 01/01/04 03:51 PM
Joined: Mar 2002
Posts: 197
P
Member
Member
P Offline
Joined: Mar 2002
Posts: 197
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/03/04 11:10 PM
Joined: Dec 2003
Posts: 38
Junior Member
Junior Member
Joined: Dec 2003
Posts: 38
So extern is used to use global variables in more than one program from a single file: IE header files?

#17241 01/07/04 10:00 PM
Joined: Mar 2002
Posts: 1,273
DollarDNS Owner
DollarDNS Owner
Joined: Mar 2002
Posts: 1,273
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 07:41 AM
Joined: Jan 2004
Posts: 1
R
Junior Member
Junior Member
R Offline
Joined: Jan 2004
Posts: 1
hi guys im new here


[Linked Image]

Link Copied to Clipboard
Member Spotlight
None yet
Forum Statistics
Forums41
Topics33,840
Posts68,858
Members2,176
Most Online3,253
Jan 13th, 2020
Latest Postings
Top Posters
UGN Security 41,392
Gremelin 7,203
§intå× 3,255
SilentRage 1,273
Ice 1,146
pergesu 1,136
Infinite 1,041
jonconley 955
Girlie 908
unreal 860
Top Likes Received
Ghost 2
Crime 1
Ice 1
Dartur 1
Cyrez 1
Powered by UBB.threads™ PHP Forum Software 8.0.0