#include <reg52.h>
#include <intrins.h>
在 keil上調(diào)試 為什么變量顯示不正確
#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); //調(diào)試出現(xiàn)錯(cuò)誤 astt =??
astt=6; //調(diào)試出現(xiàn)錯(cuò)誤
astt=7;
}
void main( void )
{
while(1){
disbuff[0]=1; //“-”
disbuff[1]=1; //“-”
disbuff[2]=2; //“-”
Display2(disbuff);
printf("helloworld!\n");
}
}
歡迎光臨 (http://www.torrancerestoration.com/bbs/) | Powered by Discuz! X3.1 |