Click here to Skip to main content
15,927,593 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: PREPROCESSORS Pin
Christian Graus17-May-02 22:28
protectorChristian Graus17-May-02 22:28 
GeneralRe: PREPROCESSORS Pin
Nish Nishant17-May-02 22:34
sitebuilderNish Nishant17-May-02 22:34 
GeneralRe: PREPROCESSORS Pin
Maxwell Chen18-May-02 17:56
Maxwell Chen18-May-02 17:56 
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 
kilowatt wrote:
For example, the SAFE_RELEASE macro for COM interfaces:

Any macro that takes a variable is suspect, and a debugging nightmare.

kilowatt wrote:
Have you ever found any uses for macros, for some reason or another, C++ code would just not be a good solution?

At work I've written some common code as macros after much argument for an inline function. Personally I've used them in one project, a debugging tool where a macro was the only option, because it is able to report the file name and line number in which the trace command was written. A function obviously would not expand in place and therefore not work as I would desire.

Christian

The tragedy of cyberspace - that so much can travel so far, and yet mean so little.

And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
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 
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 

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.