The ## operator in C

后端 未结 7 2155
花落未央
花落未央 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:15

    The operator ## concatenates two arguments leaving no blank spaces between them:

    #define glue(a,b) a ## b
    glue(c,out) << "test";
    

提交回复
热议问题