Click here to Skip to main content
15,909,205 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How can i read/write CD using MFC classes..? Pin
David Crow10-Feb-10 4:01
David Crow10-Feb-10 4:01 
QuestionSoftware Tools Pin
Anil Kumar.Arvapalli9-Feb-10 17:44
Anil Kumar.Arvapalli9-Feb-10 17:44 
AnswerRe: Software Tools Pin
«_Superman_»9-Feb-10 18:17
professional«_Superman_»9-Feb-10 18:17 
AnswerRe: Software Tools Pin
CPallini9-Feb-10 20:36
mveCPallini9-Feb-10 20:36 
QuestionMultiple #define with same name Pin
dipuks9-Feb-10 10:44
dipuks9-Feb-10 10:44 
AnswerRe: Multiple #define with same name Pin
LunaticFringe9-Feb-10 10:50
LunaticFringe9-Feb-10 10:50 
AnswerRe: Multiple #define with same name Pin
Abhi Lahare9-Feb-10 10:52
Abhi Lahare9-Feb-10 10:52 
AnswerRe: Multiple #define with same name Pin
loyal ginger9-Feb-10 11:15
loyal ginger9-Feb-10 11:15 
The compiler gives a warning in this case because even though this practice is totally acceptable, it may indicate some type of oversight. In cases like this, the compiler's warning can be ignored if it is intentional; otherwise, it should be corrected.

As for why this is acceptable by the compiler, it is because it does not violate any rules of the language. The value of the defined symbol when it is referenced depends on the order of the two #defines that was read by the compiler when it is in the preprocessing stage. The preprocessor will use the value of the one that appeared cloest to the reference to substitute the symbol. By compile time this substitution is already done.

I would avoid this practice since it is error prone.
AnswerRe: Multiple #define with same name Pin
Maximilien9-Feb-10 11:17
Maximilien9-Feb-10 11:17 
AnswerRe: Multiple #define with same name Pin
Luc Pattyn9-Feb-10 11:38
sitebuilderLuc Pattyn9-Feb-10 11:38 
GeneralRe: Multiple #define with same name Pin
Maximilien9-Feb-10 15:15
Maximilien9-Feb-10 15:15 
AnswerRe: Multiple #define with same name Pin
T21029-Feb-10 20:56
T21029-Feb-10 20:56 
AnswerRe: Multiple #define with same name Pin
David Crow10-Feb-10 4:03
David Crow10-Feb-10 4:03 
QuestionFile Input/Output [solved] Pin
Eugén Jung9-Feb-10 8:33
Eugén Jung9-Feb-10 8:33 
AnswerRe: File Input/Output Pin
Maximilien9-Feb-10 9:03
Maximilien9-Feb-10 9:03 
QuestionHow to call global functions of dll with void* (or some more generic pointer) Pin
glitteringsound9-Feb-10 7:35
glitteringsound9-Feb-10 7:35 
AnswerRe: How to call global functions of dll with void* (or some more generic pointer) Pin
Avi Berger9-Feb-10 8:07
Avi Berger9-Feb-10 8:07 
AnswerRe: How to call global functions of dll with void* (or some more generic pointer) [modified] Pin
BonshatS9-Feb-10 10:20
BonshatS9-Feb-10 10:20 
AnswerRe: How to call global functions of dll with void* (or some more generic pointer) Pin
T21029-Feb-10 20:58
T21029-Feb-10 20:58 
GeneralRe: How to call global functions of dll with void* (or some more generic pointer) [modified] Pin
glitteringsound9-Feb-10 21:30
glitteringsound9-Feb-10 21:30 
GeneralRe: How to call global functions of dll with void* (or some more generic pointer) Pin
Rozis10-Feb-10 14:07
Rozis10-Feb-10 14:07 
QuestionHow to import a file into PE header of an exe then load that file from within modified exe Pin
only_jack9-Feb-10 5:51
only_jack9-Feb-10 5:51 
AnswerRe: How to import a file into PE header of an exe then load that file from within modified exe Pin
Richard MacCutchan9-Feb-10 6:17
mveRichard MacCutchan9-Feb-10 6:17 
GeneralRe: How to import a file into PE header of an exe then load that file from within modified exe Pin
only_jack9-Feb-10 7:08
only_jack9-Feb-10 7:08 
GeneralRe: How to import a file into PE header of an exe then load that file from within modified exe Pin
David Crow9-Feb-10 7:19
David Crow9-Feb-10 7:19 

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.