#include <reg52.h>
#include <intrins.h>
在 keil上调试 为什么变量显示不正确
#include <stdio.h>
unsigned char disbuff[4]={ 0,0,0,0,};
void Display2(unsigned char *str)
{
unsigned char astt;
astt=*str; // 变量不正确 astt=??
astt=*(str+1); //调试出现错误 astt =??
astt=6; //调试出现错误
astt=7;
}
void main( void )
{
while(1){
disbuff[0]=1; //“-”
disbuff[1]=1; //“-”
disbuff[2]=2; //“-”
Display2(disbuff);
printf("helloworld!\n");
}
}
欢迎光临 (http://www.51hei.com/bbs/) | Powered by Discuz! X3.1 |