unions

Posts 1–6 of 6 · Page 1 of 1
unions
Does anyone Active use them in your code ?
I personally have not found a reason to use them

/Discuss
Quote Originally Posted by whit View Post
Does anyone Active use them in your code ?
I personally have not found a reason to use them

/Discuss
I only use unions when working in the kernel or when I'm building a driver, and that's just because the os uses them when working with LARGE_INTEGERS and other such data types. You can divide the LARGE_INTEGER (int64) in two parts (Low and High) without wasting memory using unions.
I've only ever used unions twice, both times were for structures related to my PE parser, in terms of using them in my own personal code, can't say I've ever really needed them
I personally never used one..I feel unloved
i've used unions...once..
union
{
int16
int32
int64
}

The only use I've found for unions.
Posts 1–6 of 6 · Page 1 of 1

Post a Reply

Tags for this Thread

None

Talk with us