Click here to Skip to main content
15,911,646 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow implements a tab control window dock to any inner side of the window? Pin
Yu_Matrix30-Nov-02 21:19
Yu_Matrix30-Nov-02 21:19 
Questionwhat's the best way to send an email? Pin
devvvy30-Nov-02 20:36
devvvy30-Nov-02 20:36 
AnswerRe: what's the best way to send an email? Pin
Rohit  Sinha1-Dec-02 4:03
Rohit  Sinha1-Dec-02 4:03 
GeneralRe: what's the best way to send an email? Pin
devvvy1-Dec-02 10:14
devvvy1-Dec-02 10:14 
Generalreturning strings from a component Pin
bachan30-Nov-02 20:33
bachan30-Nov-02 20:33 
GeneralRe: returning strings from a component Pin
Michael Dunn30-Nov-02 20:35
sitebuilderMichael Dunn30-Nov-02 20:35 
GeneralMore link troubles... Pin
Jamie Hale30-Nov-02 19:46
Jamie Hale30-Nov-02 19:46 
GeneralRe: More link troubles... Pin
Michael Dunn30-Nov-02 20:32
sitebuilderMichael Dunn30-Nov-02 20:32 
If I remember my finer points of the C++ spec right, extern and const are at odds - a global variable that is declared const automatically gets internal linkage (that is, it needs to be defined in the same translation unit (CPP file) as the declaration). When the compiler gets to another CPP file, it knows there's a constant called whatever but it does not know its value. Adding extern doesn't change the variable's linkage because the compiler still doesn't know the value of whatever. It's similar to templates, where the entire template class has to be visible to all CPP files.

You should be able to put const int whatever = 76; in the header file, and there won't be any symbol collisions because each CPP file will have its own whatever with internal linkage.

--Mike--
"Adventure. Excitement. A Jedi craves not these things."
  -- Silent Bob

1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm

GeneralRe: More link troubles... Pin
Jamie Hale2-Dec-02 11:26
Jamie Hale2-Dec-02 11:26 
GeneralRe: More link troubles... Pin
Michael Dunn3-Dec-02 13:14
sitebuilderMichael Dunn3-Dec-02 13:14 
GeneralRich edit control Pin
Rohit  Sinha30-Nov-02 18:30
Rohit  Sinha30-Nov-02 18:30 
GeneralBig chunks of memory. Pin
clintsinger30-Nov-02 18:06
clintsinger30-Nov-02 18:06 
GeneralRe: Big chunks of memory. Pin
Chris Losinger30-Nov-02 18:43
professionalChris Losinger30-Nov-02 18:43 
QuestionHow to handle image using MFC? Pin
kyoko30-Nov-02 15:58
kyoko30-Nov-02 15:58 
AnswerRe: How to handle image using MFC? Pin
Christian Graus30-Nov-02 16:15
protectorChristian Graus30-Nov-02 16:15 
General181 link errors... Pin
Jamie Hale30-Nov-02 14:40
Jamie Hale30-Nov-02 14:40 
GeneralRe: 181 link errors... Pin
Michael Dunn30-Nov-02 14:58
sitebuilderMichael Dunn30-Nov-02 14:58 
GeneralRe: 181 link errors... Pin
Jamie Hale30-Nov-02 15:49
Jamie Hale30-Nov-02 15:49 
GeneralWinsock Programming Pin
Steven M Hunt30-Nov-02 14:22
Steven M Hunt30-Nov-02 14:22 
GeneralRe: Winsock Programming Pin
valikac30-Nov-02 14:40
valikac30-Nov-02 14:40 
GeneralRe: Winsock Programming Pin
valikac30-Nov-02 15:15
valikac30-Nov-02 15:15 
GeneralRe: Winsock Programming Pin
Steven M Hunt1-Dec-02 14:17
Steven M Hunt1-Dec-02 14:17 
GeneralExtracting attachments from email Pin
AlexMarbus30-Nov-02 13:42
AlexMarbus30-Nov-02 13:42 
GeneralRe: Extracting attachments from email Pin
Ravi Bhavnani30-Nov-02 14:42
professionalRavi Bhavnani30-Nov-02 14:42 

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.