Previous Thread
Next Thread
Print Thread
Rate Thread
extern in cpp #17238
01/01/04 06:07 AM
01/01/04 06:07 AM
Joined: Dec 2003
Posts: 38
canada
acid45 Offline OP
Junior Member
acid45  Offline OP
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.

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

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...
Re: extern in cpp #17240
01/04/04 06:10 AM
01/04/04 06:10 AM
Joined: Dec 2003
Posts: 38
canada
acid45 Offline OP
Junior Member
acid45  Offline OP
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?

Re: extern in cpp #17241
01/08/04 05:00 AM
01/08/04 05:00 AM
Joined: Mar 2002
Posts: 1,273
OH, USA
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
Re: extern in cpp #17242
01/26/04 02:41 PM
01/26/04 02:41 PM
Joined: Jan 2004
Posts: 1
philippines
R
raquel Offline
Junior Member
raquel  Offline
Junior Member
R

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


[Linked Image]

Member Spotlight
Crime
Crime
SC, usa
Posts: 508
Joined: March 2002
Show All Member Profiles 
Forum Statistics
Forums41
Topics33,680
Posts68,696
Average Daily Posts0
Members2,175
Most Online1,567
Apr 25th, 2010
Latest Postings
Blackbeard.....
by Gremelin. 10/04/18 02:02 AM
my old account still exists!
by Crime. 08/10/18 09:47 PM
Top Posters(All Time)
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 Liked Users (All Time)
§intå× Likes: 3
Black Beard Likes: 1
Cold Sunn Likes: 1
Crime Likes: 1
Cyrez Likes: 1
Dartur Likes: 1
fleshwound Likes: 1
Ghost Likes: 2
Girlie Likes: 1
Gremelin Likes: 14
Powered by UBB.threads™ PHP Forum Software 7.6.3
(Snapshot build 20181002)