【发布时间】:2011-08-16 05:50:26
【问题描述】:
#定义第2行
#define cols 2
#define NUM_CORNERS 4
诠释主要(无效){
诠释我;
int the_corners[NUM_CORNERS];
int 数组[行][列] = {{1, 2}, {3, 4}};
角落(数组,the_corners);
for (i = 0; i
我收到这些奇怪的错误,我不知道为什么:
prog.c: In function ‘main’:
prog.c:10: warning: implicit declaration of function ‘corners’
prog.c: In function ‘corners’:
prog.c:15: error: expected expression before
【问题讨论】:
-
请将您的代码粘贴到这里,而不是使用外部链接
-
我建议您对所有
#define常量使用大写。人们通常不期望小写的东西——特别是如果它们不是函数——是预处理器宏/常量。 -
gotcha - ...这对 C 有什么帮助?
标签: c expression