| 查看: 1116 | 回复: 8 | ||
| 当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖 | ||
[求助]
学习单片机用keil 变量定义问题
|
||
|
#include <reg51.h> void main(void) { // linking P0~P7=a~g,dp // 0~9~F,hex,common negative unsigned char neg_leddis[16]={ 0x3f,0x06,0x5b,0x4f, 0x66,0x6d,0x7d,0x07, 0x7f,0x6f,0x77,0x7c, 0x39,0x5e,0x79,0x71}; unsigned char neg_point=0x80; unsigned char pos_leddis[16]; int i; for(i=0;i<=15;i++) pos_leddis=~neg_leddis; unsigned char pos_point=~0x80; P1=0x00; P0=neg_leddis[7]|neg_point; while(1); } 编译时候总出现,unsigned char pos_point=~0x80出错,Build target 'Target 1' compiling 001.c... 001.c(19): error C141: syntax error near 'unsigned' 001.c(19): error C202: 'pos_point': undefined identifier Target not created. 如果把“unsigned char pos_point=~0x80“ 提到 for语句之前,就不会报错,请问这是怎么回事? 谢谢 |
» 猜你喜欢
现代”学阀”该如何界定
已经有12人回复
国社科系统bug了,是不是要放榜了?
已经有10人回复
课题组招2027级博士 上海工程技术大学 激光智能制造方向
已经有4人回复
上海工程技术大学 激光智能制造课题组 2027级博士研究生招生
已经有3人回复
上海工程技术大学激光智能制造课题组|2027级博士研究生招生公告
已经有11人回复
我的奶奶
已经有3人回复
5楼2016-04-22 19:21:26
2楼2016-04-19 14:14:10
3楼2016-04-19 14:15:40
4楼2016-04-19 14:16:27










回复此楼