Click here to Skip to main content
16,004,969 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: PREPROCESSORS Pin
Christian Graus18-May-02 18:01
protectorChristian Graus18-May-02 18:01 
GeneralRe: PREPROCESSORS Pin
Maxwell Chen18-May-02 18:31
Maxwell Chen18-May-02 18:31 
GeneralRe: PREPROCESSORS Pin
Tim Smith19-May-02 3:06
Tim Smith19-May-02 3:06 
GeneralRe: PREPROCESSORS Pin
Paul M Watt17-May-02 22:58
mentorPaul M Watt17-May-02 22:58 
GeneralRe: PREPROCESSORS Pin
Christian Graus17-May-02 23:06
protectorChristian Graus17-May-02 23:06 
GeneralRe: PREPROCESSORS Pin
Paul M Watt17-May-02 23:11
mentorPaul M Watt17-May-02 23:11 
GeneralRe: PREPROCESSORS Pin
Rama Krishna Vavilala18-May-02 1:56
Rama Krishna Vavilala18-May-02 1:56 
GeneralRe: PREPROCESSORS Pin
Mike Nordell17-May-02 23:53
Mike Nordell17-May-02 23:53 
Christian Graus wrote:
The preprocessor is evil, avoid it if you can.

Evil?

Let's say you are using VC6, since VC7 isn't really in that widespread use, then the only way to fix some bugs in Microsoft's "interpretation" of the C++ language is to use the preprocessor (f.ex. the age-old #define for if(0){}else for). Anything that helps fix Microsoft bugs must surely be not from the dark side. Smile | :)

It's also the only way you can:

  • do portable include file protection
  • implement assert
  • stringize a (type-) name
  • Select the right library to link with automagically, especially when you have got six different possible CRT models (single-threaded, multi-threaded, multithreaded using CRT from DLL, and then debug and release versions of these three)
  • ...


There is of course ways to use the preprocessor for the purposes of the dark side, MFC message maps comes to mind, but say the language feature that can't be misused.

/Mike In the hands of the wrong person, even see-hash can be dangerous... I think...
GeneralRe: PREPROCESSORS Pin
Christian Graus18-May-02 2:50
protectorChristian Graus18-May-02 2:50 
GeneralRe: PREPROCESSORS Pin
Mike Nordell19-May-02 2:19
Mike Nordell19-May-02 2:19 
GeneralRe: PREPROCESSORS Pin
Rama Krishna Vavilala18-May-02 1:54
Rama Krishna Vavilala18-May-02 1:54 
GeneralRe: PREPROCESSORS Pin
Alexandru Savescu17-May-02 22:18
Alexandru Savescu17-May-02 22:18 
GeneralGet Icons from ToolBars Pin
MaTrIX2k217-May-02 20:14
MaTrIX2k217-May-02 20:14 
GeneralRe: Get Icons from ToolBars Pin
Nish Nishant17-May-02 21:42
sitebuilderNish Nishant17-May-02 21:42 
GeneralRe: Get Icons from ToolBars Pin
MaTrIX2k218-May-02 9:32
MaTrIX2k218-May-02 9:32 
GeneralHelp with complex number types. Pin
oRion17-May-02 19:03
oRion17-May-02 19:03 
GeneralRe: Help with complex number types. Pin
Carlos Antollini17-May-02 19:21
Carlos Antollini17-May-02 19:21 
GeneralRe: Help with complex number types. Pin
oRion18-May-02 1:45
oRion18-May-02 1:45 
GeneralRe: Help with complex number types. Pin
Mike Nordell17-May-02 23:58
Mike Nordell17-May-02 23:58 
GeneralRe: Help with complex number types. Pin
oRion18-May-02 1:32
oRion18-May-02 1:32 
GeneralRe: Help with complex number types. Pin
Mike Nordell18-May-02 2:07
Mike Nordell18-May-02 2:07 
GeneralRe: Help with complex number types. Pin
oRion18-May-02 2:37
oRion18-May-02 2:37 
GeneralRe: Help with complex number types. Pin
oRion18-May-02 2:43
oRion18-May-02 2:43 
Questiona error has been throwed out when I add records into database? Pin
white jungle17-May-02 18:21
white jungle17-May-02 18:21 
AnswerRe: a error has been throwed out when I add records into database? Pin
Maxwell Chen17-May-02 18:31
Maxwell Chen17-May-02 18:31 

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.