Click here to Skip to main content
15,921,156 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How could i draw an irregular window in mfc Pin
Abhishek Srivastava20-Nov-03 17:12
Abhishek Srivastava20-Nov-03 17:12 
GeneralA question about HTMLHELP Pin
Sunjoy Chen20-Nov-03 16:05
Sunjoy Chen20-Nov-03 16:05 
GeneralSTL set.h Performance Analysis Pin
BrianReeve20-Nov-03 15:33
BrianReeve20-Nov-03 15:33 
Questionwhy can't global fn access global variable? Pin
closecall20-Nov-03 14:31
closecall20-Nov-03 14:31 
AnswerRe: why can't global fn access global variable? Pin
Prakash Nadar20-Nov-03 16:03
Prakash Nadar20-Nov-03 16:03 
GeneralRe: why can't global fn access global variable? Pin
closecall20-Nov-03 18:11
closecall20-Nov-03 18:11 
GeneralRe: why can't global fn access global variable? Pin
Prakash Nadar20-Nov-03 23:51
Prakash Nadar20-Nov-03 23:51 
Answernevermind... the world is good again. Pin
closecall20-Nov-03 18:35
closecall20-Nov-03 18:35 
found the solution on CP's FAQ....

6.2: How do I share a global variable among my .CPP files? (top)

First, in one of your .CPP files (and only one) declare the variable at global scope (that is, outside of all function and class definitions). For example:

int g_volume;
Then in a header file that is included in all .CPP files - such as stdafx.h - add an extern declaration:

extern int g_volume;
The extern keyword tells the compiler that g_volume is an int declared in some other .CPP file. If you forget the first step, the linker will give an unresolved external error.
Cool | :cool:


GeneralGDI+, Quick question Pin
Jörgen Sigvardsson20-Nov-03 14:13
Jörgen Sigvardsson20-Nov-03 14:13 
GeneralRe: GDI+, Quick question Pin
Alex Korchemniy20-Nov-03 14:48
Alex Korchemniy20-Nov-03 14:48 
GeneralRe: GDI+, Quick question Pin
J. Dunlap20-Nov-03 14:59
J. Dunlap20-Nov-03 14:59 
GeneralRe: GDI+, Quick question Pin
Jörgen Sigvardsson20-Nov-03 22:34
Jörgen Sigvardsson20-Nov-03 22:34 
GeneralRe: GDI+, Quick question Pin
Mike Dimmick21-Nov-03 3:15
Mike Dimmick21-Nov-03 3:15 
GeneralRe: GDI+, Quick question Pin
J. Dunlap20-Nov-03 14:57
J. Dunlap20-Nov-03 14:57 
QuestionHow do you get the default email client on 95/98/98se/me/xp/nt/2000 Pin
BaldwinMartin20-Nov-03 14:00
BaldwinMartin20-Nov-03 14:00 
AnswerRe: How do you get the default email client on 95/98/98se/me/xp/nt/2000 Pin
Peter Molnar20-Nov-03 15:02
Peter Molnar20-Nov-03 15:02 
GeneralRe: How do you get the default email client on 95/98/98se/me/xp/nt/2000 Pin
BaldwinMartin20-Nov-03 15:19
BaldwinMartin20-Nov-03 15:19 
GeneralRe: How do you get the default email client on 95/98/98se/me/xp/nt/2000 Pin
Peter Molnar20-Nov-03 15:34
Peter Molnar20-Nov-03 15:34 
GeneralRe: How do you get the default email client on 95/98/98se/me/xp/nt/2000 Pin
Peter Molnar20-Nov-03 15:51
Peter Molnar20-Nov-03 15:51 
GeneralRe: How do you get the default email client on 95/98/98se/me/xp/nt/2000 Pin
Anonymous20-Nov-03 16:06
Anonymous20-Nov-03 16:06 
GeneralRe: How do you get the default email client on 95/98/98se/me/xp/nt/2000 Pin
Peter Molnar20-Nov-03 16:13
Peter Molnar20-Nov-03 16:13 
GeneralRe: How do you get the default email client on 95/98/98se/me/xp/nt/2000 Pin
BaldwinMartin20-Nov-03 19:25
BaldwinMartin20-Nov-03 19:25 
GeneralRe: How do you get the default email client on 95/98/98se/me/xp/nt/2000 Pin
BaldwinMartin20-Nov-03 19:48
BaldwinMartin20-Nov-03 19:48 
GeneralRe: How do you get the default email client on 95/98/98se/me/xp/nt/2000 Pin
Peter Molnar21-Nov-03 1:12
Peter Molnar21-Nov-03 1:12 
GeneralRe: How do you get the default email client on 95/98/98se/me/xp/nt/2000 Pin
BaldwinMartin21-Nov-03 8:02
BaldwinMartin21-Nov-03 8:02 

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.