| 查看: 882 | 回复: 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语句之前,就不会报错,请问这是怎么回事? 谢谢 |
» 猜你喜欢
投稿Elsevier的Neoplasia杂志,到最后选publishing options时页面空白,不能完成投稿
已经有22人回复
申请26博士
已经有5人回复
职称评审没过,求安慰
已经有22人回复
垃圾破二本职称评审标准
已经有15人回复
EST投稿状态问题
已经有7人回复
毕业后当辅导员了,天天各种学生超烦
已经有4人回复
聘U V热熔胶研究人员
已经有10人回复
求助文献
已经有3人回复
投稿返修后收到这样的回复,还有希望吗
已经有8人回复
三无产品还有机会吗
已经有6人回复
3楼2016-04-19 14:15:40
2楼2016-04-19 14:14:10
4楼2016-04-19 14:16:27
5楼2016-04-22 19:21:26













回复此楼