Click here to Skip to main content
15,904,288 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Global Variables in SDI Pin
LittleYellowBird18-Apr-10 23:50
LittleYellowBird18-Apr-10 23:50 
To access 'g_m' from another cpp file you need to declare 'g_m' as an extern in that file - see my first post. In my first post I suggested that you have dedicated files for this purpose, Globals.h and Externs.h. If you do this each time a cpp file needs to access a global you can just include the 'Externs.h' so it makes life easier. Also it anables you to quickly see all your globals at one time, you could add the extern declaration to each file that needs to access the global but as your project grows it will probably get messy very quickly. Smile | :)
Ali

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 
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 
GeneralRe: Global Variables in SDI Pin
hellogany20-Apr-10 20:22
hellogany20-Apr-10 20:22 
QuestionHow to get the hidden drives in windows? Pin
G Haranadh18-Apr-10 21:17
G Haranadh18-Apr-10 21:17 
AnswerRe: How to get the hidden drives in windows? Pin
SelvaKr18-Apr-10 23:08
SelvaKr18-Apr-10 23:08 
GeneralRe: How to get the hidden drives in windows? Pin
G Haranadh18-Apr-10 23:30
G Haranadh18-Apr-10 23:30 
AnswerRe: How to get the hidden drives in windows? Pin
Michel Godfroid19-Apr-10 0:01
Michel Godfroid19-Apr-10 0:01 
GeneralRe: How to get the hidden drives in windows? Pin
G Haranadh19-Apr-10 0:11
G Haranadh19-Apr-10 0:11 
QuestionAdding controls to an existing window Pin
depsch18-Apr-10 14:17
depsch18-Apr-10 14:17 
AnswerRe: Adding controls to an existing window Pin
Gwenio18-Apr-10 15:29
Gwenio18-Apr-10 15:29 

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.