C语言求助
编译成功,但运行时没有任何输出,谢谢#include <stdio.h>
#define FUNCTION(name, a) int fun_##name(int x) { return (a)*x;}
FUNCTION(Test, 10)
int main(void)
{
printf("Hello\n");
printf("%d\n", fun_Test(123));
printf("Hello\n");
return 0;
}
sh-4.4$ cat main.c
#include <stdio.h>
#define FUNCTION(name, a) int fun_##name(int x) { return (a)*x;}
FUNCTION(Test, 10)
int main(void)
{
printf("Hello\n");
printf("%d\n", fun_Test(123));
printf("Hello\n");
return 0;
}
sh-4.4$ gcc -o main main.c
sh-4.4$ ./main.exe
Hello
1230
Hello
sh-4.4$
页:
[1]