就是这段程序,为什么分号后面的也不能删掉?#define test(p1,p2,p3,p4,p5,p6,p7) {exp[0]=(p1),exp[1]=(p2),\exp[2]=(p3),exp[3]=(p4),exp[4]=(p5),exp[5]=(p6),exp[6]=(p7); \idx=0;\maketree(exp,&idx,&head); \if (work(&head)==res) \{ \found++;

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/09 16:54:10

就是这段程序,为什么分号后面的也不能删掉?#define test(p1,p2,p3,p4,p5,p6,p7) {exp[0]=(p1),exp[1]=(p2),\exp[2]=(p3),exp[3]=(p4),exp[4]=(p5),exp[5]=(p6),exp[6]=(p7); \idx=0;\maketree(exp,&idx,&head); \if (work(&head)==res) \{ \found++;
就是这段程序,为什么分号后面的也不能删掉?
#define test(p1,p2,p3,p4,p5,p6,p7) {exp[0]=(p1),exp[1]=(p2),\
exp[2]=(p3),exp[3]=(p4),exp[4]=(p5),exp[5]=(p6),exp[6]=(p7); \
idx=0;\
maketree(exp,&idx,&head); \
if (work(&head)==res) \
{ \
found++;printf("%5d:",found);show(&head);\
if (found%3)) printf("\n");\
} \
destroy(&head);\
}\

就是这段程序,为什么分号后面的也不能删掉?#define test(p1,p2,p3,p4,p5,p6,p7) {exp[0]=(p1),exp[1]=(p2),\exp[2]=(p3),exp[3]=(p4),exp[4]=(p5),exp[5]=(p6),exp[6]=(p7); \idx=0;\maketree(exp,&idx,&head); \if (work(&head)==res) \{ \found++;
因为这是个宏定义撒~宏定义需要在一行内完成,如果换行了,必须要加续行符~