c++ error: expected ‘,‘ or ‘...‘ before numeric constant|
还是关于宏的问题,在条件编译的时候,不要将#if的常量表达式提到文件包含之前,放在其后便不会报错:#include#defineflag1//#if的常量表达式#definePI3.14usingnamespacestd;intmain(){doubleradius,sr,a,ss;#ifflag//根据常量表达式的真假对不同的程序块进行编译//{cout>radius;sr=PI*radius*