void DisPrintChar(float xx,uchar FormatSel) { uchar i; uchar di[7]; for(i=0;i<7;i++) di = 0; if(FormatSel!=0) //功率格式 { LcdPartClear(8,6,0,4,0); sprintf(di,"%4.1f",xx); //3.1 for(i=0;i<4;i++) { LcdDisBigASC(8,i+6,0,di-'0',0); } } else { LcdPartClear(2,6,0,8,0); //频率格式 sprintf(di,"%6.3f",xx); for(i=0;i<6;i++) { LcdDisBigASC(2,i+6,0,di-'0',0); } } } 编译到sprintf(di,"%4.1f",xx); //3.1 显示出错c3028e : sprintf的第一个参数implicit cast of pointer to non-equal pointer 有用过的路过指点一下!谢谢 |