51单片机,C语言程序,指针小例子
#include<reg52.h>voidmain(){unsignedcharcodedate[]={0XFF,0XFE,0XFD,0XFB,0XF7,0XEF,0XD...
#include<reg52.h>
void main()
{
unsigned char code date[] =
{0XFF,0XFE,0XFD,0XFB,0XF7,0XEF,0XDF,0XBF,
0X7F,0X7F,0XBF,0XDF,0XEF,0XF7,0XFB,0XFD,
0XFE,0XFF,0XFF,0XFE,0XFC,0XF8,0XF0,0XE0,
0XC0,0X80,0X0,0XE7,0XD8,0XBD,0X7E,0XFF;
};
unsigned int a;
unsigned char b;
unsigned char code * finger;
do
{
finger=&date[0];
for(b=0;b<32;b++)
{
for(a=0;a<30000;a++)
; //延时一段时间
P1=*finger;
finger++;
}
}
while(1);
}
为什么我的程序编译的时候出错呢 ?原因查不了,请大家给看看。。谢谢 展开
void main()
{
unsigned char code date[] =
{0XFF,0XFE,0XFD,0XFB,0XF7,0XEF,0XDF,0XBF,
0X7F,0X7F,0XBF,0XDF,0XEF,0XF7,0XFB,0XFD,
0XFE,0XFF,0XFF,0XFE,0XFC,0XF8,0XF0,0XE0,
0XC0,0X80,0X0,0XE7,0XD8,0XBD,0X7E,0XFF;
};
unsigned int a;
unsigned char b;
unsigned char code * finger;
do
{
finger=&date[0];
for(b=0;b<32;b++)
{
for(a=0;a<30000;a++)
; //延时一段时间
P1=*finger;
finger++;
}
}
while(1);
}
为什么我的程序编译的时候出错呢 ?原因查不了,请大家给看看。。谢谢 展开
2013-08-26
展开全部
--ni ma .
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询