大家看看!!!
extern int pulse[2];
pulse( )
{
Unsignedint i,di_pul;
di_pul = GpioMcRegs.GPEDIR.all&0x0060;
di_pul = di_pul>>4;
for(i=0;i<2;i++)
{
di_pul = di_pul>>1;
if(!(di_pul&1))
pulse[i]++;
}
}
line 2: error: declaration is incompatible with "int pulse[2]" (declared at line 1)
line 12: error: expression must be a pointer to a complete object type为什么我把pulse[2]定义成全局变量,就会出现这种错误,如果不定义成全局的就没有呢 ?
[此贴子已经被作者于2005-3-25 11:11:01编辑过]