c - 使用常量时报错: too few arguments in function call,

标签 c

我定义了以下常量:

#define SIZE 1;

然后使用如下:

foo = calloc(SIZE, sizeof(char));

为什么我会得到这个:

Error: too few arguments in function call

最佳答案

#define中去掉;。这正在扩展到:

foo = calloc(1;, sizeof(char));

关于c - 使用常量时报错: too few arguments in function call,,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29686421/

相关文章:

c - 未命名管道在我的代码中不起作用

使用 curl 为 PAM 模块编译目标文件

c - 如何指定手册页的域

c - 使用 write 在文件中写入 int 变量

c - C 和 Windows Vista 中的 Dos.h + Pc.h

c - &A[1] 应该与 A 本身的地址相同吗?

c - ==符号是什么意思?

c - 有没有办法在满足条件后跳过循环中的条件语句?

c - 确定 sscanf 是否使用 %*s 读取任何内容

c - "struct{...} x, y, z;"是什么意思?