Click here to Skip to main content
15,896,428 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: SDI Data Transfer (Windows Explorer) Pin
David Crow19-Apr-10 3:18
David Crow19-Apr-10 3:18 
QuestionGlobal Variables in SDI Pin
hellogany18-Apr-10 22:33
hellogany18-Apr-10 22:33 
AnswerRe: Global Variables in SDI Pin
LittleYellowBird18-Apr-10 22:55
LittleYellowBird18-Apr-10 22:55 
GeneralRe: Global Variables in SDI Pin
hellogany18-Apr-10 22:57
hellogany18-Apr-10 22:57 
GeneralRe: Global Variables in SDI Pin
KarstenK18-Apr-10 23:32
mveKarstenK18-Apr-10 23:32 
GeneralRe: Global Variables in SDI Pin
hellogany18-Apr-10 23:39
hellogany18-Apr-10 23:39 
GeneralRe: Global Variables in SDI Pin
KarstenK18-Apr-10 23:45
mveKarstenK18-Apr-10 23:45 
QuestionRe: Global Variables in SDI Pin
David Crow19-Apr-10 3:19
David Crow19-Apr-10 3:19 
GeneralRe: Global Variables in SDI Pin
LittleYellowBird18-Apr-10 23:50
LittleYellowBird18-Apr-10 23:50 
GeneralRe: Global Variables in SDI Pin
hellogany19-Apr-10 0:02
hellogany19-Apr-10 0:02 
GeneralRe: Global Variables in SDI Pin
hellogany19-Apr-10 0:06
hellogany19-Apr-10 0:06 
GeneralRe: Global Variables in SDI Pin
David Crow19-Apr-10 3:22
David Crow19-Apr-10 3:22 
GeneralRe: Global Variables in SDI Pin
LittleYellowBird19-Apr-10 0:12
LittleYellowBird19-Apr-10 0:12 
GeneralRe: Global Variables in SDI Pin
CPallini19-Apr-10 0:18
mveCPallini19-Apr-10 0:18 
GeneralRe: Global Variables in SDI Pin
hellogany19-Apr-10 0:26
hellogany19-Apr-10 0:26 
GeneralRe: Global Variables in SDI Pin
Cedric Moonen19-Apr-10 0:52
Cedric Moonen19-Apr-10 0:52 
GeneralRe: Global Variables in SDI Pin
LittleYellowBird19-Apr-10 0:26
LittleYellowBird19-Apr-10 0:26 
GeneralRe: Global Variables in SDI Pin
CPallini19-Apr-10 0:37
mveCPallini19-Apr-10 0:37 
GeneralRe: Global Variables in SDI Pin
LittleYellowBird19-Apr-10 0:45
LittleYellowBird19-Apr-10 0:45 
CPallini wrote:
If you include the header into exactly one source file then the linker will cheer you.


That's what I do, I declare my global variable in a header called 'Globals.h', then include it just once! Thumbs Up | :thumbsup:
Then I declare it as extern in Externs.h and include it wherever I want to use it ..... Smile | :)

The linker is happy, but I thought you considered it a bad habit or bad style and I wondered why ..... maybe I missunderstood ...... Smile | :)
Ali

GeneralRe: Global Variables in SDI Pin
CPallini19-Apr-10 0:50
mveCPallini19-Apr-10 0:50 
GeneralRe: Global Variables in SDI Pin
hellogany19-Apr-10 0:58
hellogany19-Apr-10 0:58 
GeneralRe: Global Variables in SDI Pin
CPallini19-Apr-10 1:20
mveCPallini19-Apr-10 1:20 
GeneralRe: Global Variables in SDI Pin
hellogany19-Apr-10 17:00
hellogany19-Apr-10 17:00 
GeneralRe: Global Variables in SDI Pin
CPallini19-Apr-10 22:02
mveCPallini19-Apr-10 22:02 
GeneralRe: Global Variables in SDI Pin
Iain Clarke, Warrior Programmer19-Apr-10 23:13
Iain Clarke, Warrior Programmer19-Apr-10 23:13 

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.