Http://blog.sina.com.cn/s/blog_69ebf25c0100kl0c.html
What does single slash "\" in VC mean at the end of a row? Reward score: 10 - Resolution time:
20: 11
What does single slash "\" in VC mean at the end of a row? For example: # define code_work \ index_check = toindex (check); \ If (next = target) return checkstep [index_check] + 1; \ index_next = toindex (next );\
Questioner: Wujianhao050 - Level 4 Best Answer
there is a formal name for this stuff called a line break, add and remove the same values after the regular Code line (VC automatically judges the continued rows), but it is particularly useful in macro definition, because the macro definition must be completed in one line: # define somefun (X, a, B) if (x) x = a + B; else x = A-B; this line of definition is fine, but this code is not easy to understand and will be difficult to maintain in the future. If it is written as: # define somefun (X, a, B) if (X) X = a + B; else x = A-B; this is a good understanding, but the compiler will make an error because it will think that # define somefun (X, a, B) is a complete line. If (X) and the subsequent statements are irrelevant to # define somefun (X, a, B. in this case, we must use the following statement: # define somefun (X, a, B) \ If (x) \ x = a + B; \ else \ x = A-B; note: Do not add a line break to the last line. the pre-processor of VC automatically removes the \ and line feed carriage return before compilation, so that reading is not affected, but the logic is not affected.