What is the '\' operator in the C language?

前端 未结 3 1361
猫巷女王i
猫巷女王i 2020-12-11 21:37

The example that I am looking at is like this:

#define CONTROL_MEM_SIZE    ((CONTROL_ITEM_SIZE * CONTROL_QUEUE_SIZE) +   \\
                            portQ         


        
3条回答
  •  长情又很酷
    2020-12-11 22:32

    It's not an operator, really. It's just a line extension - it tells the preprocessor that the #define replacement text continues on the next line of the file.

    Check out #3 at this link:

    Continued lines are merged into one long line. A continued line is a line which ends with a backslash, \. The backslash is removed and the following line is joined with the current one.

提交回复
热议问题