原來還有#elif,代碼來了!
文件: if_elif.c
#include <stdio.h> #define A -1 int main(int agrc, char **argv) { #if A > 0 printf("A > 0\n"); #elif A < 0 printf("A < 0 \n"); #else printf("A == 0 \n"); #endif return 0; }
原來還有#elif,代碼來了!
文件: if_elif.c
#include <stdio.h> #define A -1 int main(int agrc, char **argv) { #if A > 0 printf("A > 0\n"); #elif A < 0 printf("A < 0 \n"); #else printf("A == 0 \n"); #endif return 0; }
https://www.bilibili.com/video/BV1k8411575T/?vd_source=d68ed178f151e80fea1e02efd205802c