Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 18th, 2012  |  syntax: None  |  size: 0.32 KB  |  hits: 8  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Standard Alternative for Compiler Specific Implementation of struct in union
  2. typedef union Alpha
  3. {
  4.     uint32_t OuterInt;
  5.     struct
  6.     {
  7.         unsigned char a, b, c, d, e, f;
  8.     };
  9. } *pAlpha;
  10.        
  11. struct MyData
  12. {
  13.     unsigned char a, b, c, d, e, f;
  14. };
  15. union Alpha
  16. {
  17.     uint32_t OuterInt;
  18.     MyData   data;
  19.  
  20. } *pAlpha;