标题:大家看看!!!
取消只看楼主
zhat813
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2005-3-14
 问题点数:0 回复次数:1 
大家看看!!!
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编辑过]

2005-03-25 11:09
zhat813
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2005-3-14
得分:0 
多谢,多谢,原因就在这。
2005-03-25 11:16



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-14007-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.560183 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved