• UNION and STRUCT
    I'd like to make a definition of union in one file and call it from others. Union needs to consists structures in it. Is it possible? Thank you, Goran
  • The bit struct in union
    Hello! I want to set one byte by bit. the follow works. But: (1) Why this union takes 2 bytes? union BPS_FORMAT { struct { unsigned format :8; }getbyte; struct { unsigned StopBitLen :1;...
  • Question about structs and unions
    Hello there, I've faced a problem that I couldn't solve. I hope you people can help me. I want to memcpy to a struct the datum in an array. I've done it before, and it goes like this: memcpy...
  • union/struct problem
    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; ...
  • Anonymous union inside a struct?
    The C complier doesn't like this piece of source code: ------------------------- struct MyUart { union { unsigned char rx; // read unsigned char tx; // write }; unsigned char control; // r...