#define s32 int
typedef struct
{
s32 DcValue;
s32 AcValue;
s32 AcNo;
s32 AcValueA;
s32 AcValueB;
}Ff_TypeDef;
Ff_TypeDef TakeFftMod256(s32 * fft_in)
{
Ff_TypeDef aa1;
aa1.DcValue=(*fft_in++)+1;
aa1.AcValue=(*fft_in++)+1;
aa1.AcNo=(*fft_in++)+1;
aa1.AcValueA=(*fft_in++)+1;
aa1.AcValueB=(*fft_in++)+1;
return aa1;
}
s32 ffi[5]={1,2,3,4,5};
int main(void)
{
Ff_TypeDef aaa;
s32 i;
aaa=TakeFftMod256(ffi);
printf("%d||%d||%d||%d||%d\n",aaa.DcValue, aaa.AcValue, aaa.AcNo,aaa.AcValueA,aaa.AcValueB);
for(i=0;i<5;i++) printf("%d**",ffi[i]);
return 0;
}
在VC6中调试通过,但在mdk4.12中通不过,不知是什么原因?
error: #513: a value of type "int" cannot be assigned to an entity of type "Ff_TypeDef"
难道是4.12的BUG?
|