Click here to Skip to main content
15,920,596 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: implementation and interface Pin
valikac6-Nov-03 5:44
valikac6-Nov-03 5:44 
GeneralCustomDraw in Listctrl Pin
super5-Nov-03 22:25
professionalsuper5-Nov-03 22:25 
GeneralRe: CustomDraw in Listctrl Pin
Dominik Reichl5-Nov-03 23:23
Dominik Reichl5-Nov-03 23:23 
GeneralCreating forms for outlook with C++ Pin
Anonymous5-Nov-03 22:04
Anonymous5-Nov-03 22:04 
GeneralGlobal variables???? VC++ 6.0 Pin
Anonymous5-Nov-03 21:03
Anonymous5-Nov-03 21:03 
GeneralRe: Global variables???? VC++ 6.0 Pin
Ted Ferenc5-Nov-03 21:56
Ted Ferenc5-Nov-03 21:56 
GeneralRe: Global variables???? VC++ 6.0 Pin
geo_m6-Nov-03 5:38
geo_m6-Nov-03 5:38 
GeneralRe: Global variables???? VC++ 6.0 Pin
David Chamberlain6-Nov-03 6:05
David Chamberlain6-Nov-03 6:05 
Anonymous wrote:
This error occurs if i #include "GlobalVariables.h" in each class.

I have NEVER found it a good practice to declare variables in a header file. Sure, you can be clever and use a set of #ifdef... statements in a header, but this ends up hiding your true intent, although syntactically it works just fine.

I would suggest (as a regular practice) to declare your global vars at the beginning of some main file outside the scope of anything (to make them global) and then explicitly use extern in all the other source files where you know you need that global variable.

That makes it very specific as to what you are doing, and when you (or someone else) ever needs to read that file and try to find something, they won't have to trace through a set of header files looking for the proper setting of the #defines.

Dave

"You can say that again." -- Dept. of Redundancy Dept.
GeneralCProgressCtrl + Threads Pin
KKR5-Nov-03 19:35
KKR5-Nov-03 19:35 
GeneralRe: CProgressCtrl + Threads Pin
valikac6-Nov-03 5:46
valikac6-Nov-03 5:46 
GeneralProblems in changing TrayIcon Pin
Boby.George5-Nov-03 18:52
professionalBoby.George5-Nov-03 18:52 
GeneralRead a jpeg file Pin
Abhi@Work5-Nov-03 18:16
Abhi@Work5-Nov-03 18:16 
GeneralRe: Read a jpeg file Pin
algol5-Nov-03 21:51
algol5-Nov-03 21:51 
GeneralRe: Read a jpeg file Pin
Joe Woodbury6-Nov-03 10:45
professionalJoe Woodbury6-Nov-03 10:45 
GeneralRe: Read a jpeg file Pin
Abhi@Work6-Nov-03 23:09
Abhi@Work6-Nov-03 23:09 
QuestionIs there any expert who can answer this question in this world? Pin
percyvimal5-Nov-03 18:15
percyvimal5-Nov-03 18:15 
AnswerRe: Is there any expert who can answer this question in this world? Pin
melwyn5-Nov-03 23:37
melwyn5-Nov-03 23:37 
AnswerRe: Is there any expert who can answer this question in this world? Pin
inocraM6-Nov-03 3:02
inocraM6-Nov-03 3:02 
GeneralRe: Is there any expert who can answer this question in this world? Pin
percyvimal6-Nov-03 16:59
percyvimal6-Nov-03 16:59 
Generalas soon as possible be come good Programmer ! Pin
quyetnh5-Nov-03 17:11
quyetnh5-Nov-03 17:11 
GeneralRe: as soon as possible be come good Programmer ! Pin
papaya_zm5-Nov-03 17:45
papaya_zm5-Nov-03 17:45 
GeneralRe: as soon as possible be come good Programmer ! Pin
paracha35-Nov-03 17:48
paracha35-Nov-03 17:48 
GeneralRe: as soon as possible be come good Programmer ! Pin
quyetnh6-Nov-03 14:15
quyetnh6-Nov-03 14:15 
GeneralCore sdk problems Pin
schezz5-Nov-03 17:10
schezz5-Nov-03 17:10 
QuestionHow to make a wizard for embeded vc4?? Pin
fftongzhi5-Nov-03 15:48
fftongzhi5-Nov-03 15:48 

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.