小编Min*_*mir的帖子

使用C中的#if进行转换

为什么此代码会出错:

#include <stdio.h>
#define Rep (int)6
int main(){
     #if Rep==6
         printf("T");
     #else
         printf("F");

     #endif

return 0;
}
Run Code Online (Sandbox Code Playgroud)
  1. 为什么拒绝铸造呢?
  2. 它是'预处理器错误'还是'编译器错误'?

c casting compiler-errors c-preprocessor

3
推荐指数
1
解决办法
509
查看次数

标签 统计

c ×1

c-preprocessor ×1

casting ×1

compiler-errors ×1