Hello,
it works in devcpp (as c project) but not working in Keil. What is my fault. output must be "12345" but it is not.
typedef union { u8 Reg8[5]; struct { u8 Select; u32 Value32; }Regs; }CreditLoadRegs_t; const char MyArray[]={"12345"}; void MyFonc(char *Buf) { CreditLoadRegs_t *fPtr = (CreditLoadRegs_t *)Buf; printf("%s",fPtr->Reg8); } int main(void) { MyFonc(MyArray); return 0; }
you're quite right, thanks a lot