1. Welcome Guest! In order to create a new topic or reply to an existing one, you must register first. It is easy and free. Click here to sign up now!.
    Dismiss Notice

C++ #define

Discussion in 'Microsoft News' started by NewsBot, Apr 28, 2008.

  1. NewsBot

    NewsBot I Got News

    Joined:
    Feb 8, 2006
    Messages:
    1,813
    Operating System:
    Windows Vista Home Premium
    Is it possible to do inline string concatenation in a #define?

    For example:

    #define SuffixDefine(Suffix) class MySuffix { };
    SuffixDefine(World)

    would result in:

    class MyWorld { };

    ???

    Is it possible to combine the text "My" and "World" in the define?

    Another example:

    #define InlineConcat(A,[​IMG] AB

    would combine A and B at compile time rather than runtime.




     

Share This Page