我是在全域的地方设立阵列的:
char inputA[8] = {1,0,0,0,0,0,0,0} ;
char inputB[8] = {0,1,0,0,0,0,0,0} ;
char inputC[8] = {0,1,1,0,0,0,0,0} ;
char inputD[8] = {1,0,1,0,0,0,0,0} ;
char inputE[8] = {0,0,1,0,0,0,0,0} ;
char inputF[8] = {0,0,0,0,0,0,0,0} ;
char inputG[8] = {0,0,0,1,0,0,0,0} ;
然后在程式里的某函数中使用到:
int g=0 ;
if(num1 == 1)
{
for(g=0;g<8;g++)
{
input[g] = inputF[g] ;
}
TXmode = TRUE;
}
if( allstatus1 == TRUE )
{
if(weightenough == FALSE)
{
for(g=0;g<8;g++)
{
input[g] = inputA[g] ;
}
TXmode = TRUE;
}
else if(weightenough == TRUE && relayon == TRUE)
{
for(g=0;g<8;g++)
{
input[g] = inputG[g] ;
}
TXmode = TRUE;
}
}
其他的阵列使用都没有问题,就唯独inputG无法被定义使用…
求帮忙~~~~~
Felix ZF:
从你的代码来看,应该没有什么问题。