Concept of union
From: Birt (birta_at_imp.com)
Date: 05/30/04
- Next message: Arthur J. O'Dwyer: "Re: Creating an Array of Strings in C , Sorry if multiple posts"
- Previous message: Chris \( Val \): "Re: A newbie question"
- Next in thread: Gianni Mariani: "Re: Concept of union"
- Reply: Gianni Mariani: "Re: Concept of union"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 30 May 2004 17:41:49 GMT
Could someone help me understand the concept of union?
For example,
typedef union _LARGE_INTEGER
{
struct {
DWORD LowPart;
LONG HighPart;
};
LONGLONG QuadPart;
} LARGE_INTEGER, *PLARGE_INTEGER;
How does "union" work in general?
When to use it?
Why have to initialize a LARGE_INTEGER object like:
LARGE_INTEGER li = {2, 4};
instead of
LARGE_INTEGER li = 5;?
Thanks!
- Next message: Arthur J. O'Dwyer: "Re: Creating an Array of Strings in C , Sorry if multiple posts"
- Previous message: Chris \( Val \): "Re: A newbie question"
- Next in thread: Gianni Mariani: "Re: Concept of union"
- Reply: Gianni Mariani: "Re: Concept of union"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|