编译问题 case expression not constant -CSDN博客

网站介绍:文章浏览阅读6.4k次。最近遇到了一个宏:#define crReturn(z) /do {/crLine=__LINE__; return (z); case__LINE__:;/} while (0)用VS2003编译的时候,提示 error C2051: case expression not constant按照宏替换的道理,__LINE应该是会换成行号,是整数常量啊,没有问题啊,怎么会提示不是常量呢。想了半天没解决,到网上搜了个答案:编译器配置的问题,只需要在编译配置页C++/general/debug info for