- 链接地址:https://blog.csdn.net/yujinqiong/article/details/5864529#comments_2251113
- 链接标题:编译问题 case expression not constant -CSDN博客
- 所属网站:blog.csdn.net
- 被收藏次数:3827
文章浏览阅读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
版权声明:本文发布于特牛网址导航 内容均来源于互联网 如有侵权联系删除