实现代码如下:

#include <stdio.h>

void f() { printf("function\n"); }
#define f() printf("macro\n")

int main() {
  f(); // macro
  (f)(); // function

  return 0;
}

函数名加括号即可!

以上就是【如何解决C语言,函数名与宏冲突】的全部内容了,欢迎留言评论进行交流!

赞(0) 踩(0)

与本文相关的软件

发表我的评论

最新评论

  1. 暂无评论