The ## operator in C

后端 未结 7 2177
花落未央
花落未央 2020-12-06 17:02

What does ## do in C?

Example:

typedef struct
{
    unsigned int bit0:1;
    unsigned int bit1:1;
    unsigned int bit2:1;
    unsigned          


        
7条回答
  •  日久生厌
    2020-12-06 17:29

    It is string concatenation, as part of the preprocessor macro.

    (In this context, "string" refers to a preprocessor token of course, or a "string of source code", and not a C-string.)

提交回复
热议问题