Click here to Skip to main content
15,906,625 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: client connection failure! Pin
raserove26-Jun-06 2:32
raserove26-Jun-06 2:32 
GeneralRe: client connection failure! Pin
James R. Twine26-Jun-06 2:52
James R. Twine26-Jun-06 2:52 
Questionglobal variable [modified]\urgent Pin
amit.code26-Jun-06 0:10
amit.code26-Jun-06 0:10 
AnswerRe: global variable [modified]\urgent Pin
Naveen26-Jun-06 0:36
Naveen26-Jun-06 0:36 
GeneralRe: global variable [modified]\urgent Pin
amit.code26-Jun-06 0:48
amit.code26-Jun-06 0:48 
GeneralRe: global variable [modified]\urgent Pin
kakan26-Jun-06 0:51
professionalkakan26-Jun-06 0:51 
GeneralRe: global variable [modified]\urgent Pin
Naveen26-Jun-06 1:07
Naveen26-Jun-06 1:07 
AnswerRe: global variable [modified]\urgent Pin
kakan26-Jun-06 0:44
professionalkakan26-Jun-06 0:44 
In one of your source files, below #include stdafx.h, declare the global variable like this:

<br />
int GlobalInt;<br />
char GlobalCharArray[200];<br />


In the other source files, declare them like this (to tell the copmpiler/linker that they are declared somewhere else):

<br />
extern int GlobalInt;<br />
extern char GlobalCharArray[200];<br />


That's it.
GeneralRe: global variable [modified]\urgent Pin
Naveen26-Jun-06 1:03
Naveen26-Jun-06 1:03 
GeneralRe: global variable [modified]\urgent Pin
kakan26-Jun-06 1:15
professionalkakan26-Jun-06 1:15 
GeneralRe: global variable [modified]\urgent Pin
Naveen26-Jun-06 1:20
Naveen26-Jun-06 1:20 
GeneralRe: global variable [modified]\urgent Pin
kakan26-Jun-06 1:22
professionalkakan26-Jun-06 1:22 
GeneralRe: global variable [modified]\urgent Pin
amit.code26-Jun-06 1:05
amit.code26-Jun-06 1:05 
GeneralRe: global variable [modified]\urgent Pin
kakan26-Jun-06 1:16
professionalkakan26-Jun-06 1:16 
GeneralRe: global variable [modified]\urgent Pin
amit.code26-Jun-06 1:19
amit.code26-Jun-06 1:19 
GeneralRe: global variable [modified]\urgent Pin
kakan26-Jun-06 1:24
professionalkakan26-Jun-06 1:24 
QuestionSelect correct product version when double clicking from explorer Pin
benylegg226-Jun-06 0:06
benylegg226-Jun-06 0:06 
AnswerRe: Select correct product version when double clicking from explorer Pin
kakan26-Jun-06 0:11
professionalkakan26-Jun-06 0:11 
Questionhow to change button color in any dialog based form Pin
ashish dogra25-Jun-06 23:56
ashish dogra25-Jun-06 23:56 
AnswerRe: how to change button color in any dialog based form Pin
Hamid_RT26-Jun-06 0:13
Hamid_RT26-Jun-06 0:13 
GeneralRe: how to change button color in any dialog based form Pin
yogendra kaushik26-Jun-06 1:22
yogendra kaushik26-Jun-06 1:22 
GeneralRe: how to change button color in any dialog based form Pin
Hamid_RT26-Jun-06 1:57
Hamid_RT26-Jun-06 1:57 
QuestionOpen Ports Windows XP Pin
Daniel Kanev25-Jun-06 23:45
Daniel Kanev25-Jun-06 23:45 
AnswerRe: Open Ports Windows XP Pin
Sarath C25-Jun-06 23:50
Sarath C25-Jun-06 23:50 
AnswerRe: Open Ports Windows XP Pin
Naveen25-Jun-06 23:50
Naveen25-Jun-06 23:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.