Your browser does not seem to support CSS. If images appear below, please disregard them.
toggle
February
S M T W T F S
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29
Sponsored Links
Latest Postings
Topic Options
Rate This Topic
#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.

Top
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...
Top
#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?

Top
#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
Top
#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


Top

Member Spotlight
Gremelin

Gremelin
Portland, OR; USA
Posts: 7,194
Joined: February 2002
Show All Member Profiles 
Forum Statistics
Forums46
Topics43,982
Posts79,156
Members2,157
Most Online1,567
Apr 25th, 2010
Top Posters(All Time)
UGN Security 37,145
Gremelin 7,194
§intå× 3,255
SilentRage 1,273
Ice 1,146
pergesu 1,136
Infinite 1,041
jonconley 955
Girlie 908
unreal 860
Newest Members
Herbert_Sherbert, codemauve, Lillysdragon1984, Brewwit, boa
2157 Registered Users
Who's Online Now
0 registered members (), 1 guest and 1 spider.
Latest News