在结构体复初值时出错了,程序如下: struct set //车道设定值 {uchar redset; //车道红灯设定 uchar greset; //绿灯车道状态设定 uchar vioset; //车道像机设定(高位近景、低位远景) }; //主函数 int main(void) { uchar SId=0x03,i,temp,ok,disp; static uchar ScrValue,ScrId,temp1; static uchar ScrOldValue[3]={0,0,0};//,SpiDa[4]={0,0,0,0}; //uchar *SpiIp; struct set ScrSet[ScrNum]={{0x01,0x00,0x03},{0x01,0x00,0x13},{0x02,0x00,0x23} ,{0x04,0x00,0x47},{0x04,0x00,0x57},{0x08,0x00,0x67} ,{0x10,0x00,0x8B},{0x10,0x00,0x9B},{0x20,0x00,0xAB} ,{0x40,0x00,0xCF},{0x40,0x00,0xDF},{0x80,0x00,0xEF //东、南、西、北 车道对应红灯,绿灯车道状态,车道像机 struct Cmd RedCmd; struct set *ScrSetIp; struct Cmd *RedCmdIp; 在studio中仿真时12个结构体数组出现在一个地址下,不知道是为何,望大侠指点一下
1
多谢
|