一个数码管循环显示的程序编译不能通过

[复制链接]
2283|4
 楼主| trivis 发表于 2010-4-16 09:51 | 显示全部楼层 |阅读模式
unsigned int code table[] ={0x3F,0X06,0X5B,0X4F,0X66,0X6D,0X7D,0X07,0X7F,0X6F};
le7.c:6: error: syntax error before 'table'
le7.c:6: warning: type defaults to 'int' in declaration of 'table'
le7.c:6: warning: data definition has no type or storage class

刚学pic24F单片机,难道pic的数码管循环显示和51的不一样吗,还望高人指点。
yixiupu0 发表于 2010-4-17 09:15 | 显示全部楼层
应当是关键词CODE编译器不认的,  用ROM吧
epsmc 发表于 2010-4-17 10:12 | 显示全部楼层
const  unsigned char table[] ={0x3F,0X06,0X5B,0X4F,0X66,0X6D,0X7D,0X07,0X7F,0X6F};
ddtx 发表于 2010-4-17 10:25 | 显示全部楼层
既然是8位就用CHAR 好了,为什么要用INT呢
 楼主| trivis 发表于 2010-4-18 22:07 | 显示全部楼层
谢谢各路朋友的帮忙,都试了一下,但还是不行。。。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

0

主题

14

帖子

1

粉丝
快速回复 在线客服 返回列表 返回顶部