Re: storing related structs
- From: Grey Alien <grey@xxxxxxxxxxxxx>
- Date: Sat, 30 Jun 2007 16:12:46 +0100
Chris Dollin wrote:
<snip></snip>
Well, you have to be /careful/, then: you can only reliably get
at that enum (IIRC) if it's either the first field in the structure
(A or B) or a member of that first field.
Safer, I would have said, to have it outside the union -- but
it depends on the /full details of the problem you're trying
to solve/, with which we have not been blessed.
I agree. Actually, I decided to err on the side of caution and use the type enum field in struct C (external to the related structs).
.
- References:
- storing related structs
- From: Gray Alien
- Re: storing related structs
- From: Army1987
- Re: storing related structs
- From: Grey Alien
- Re: storing related structs
- From: Army1987
- Re: storing related structs
- From: Grey Alien
- Re: storing related structs
- From: Chris Dollin
- storing related structs
- Prev by Date: Re: Display C in HTML
- Next by Date: Re: Machine epsilon: conclusion
- Previous by thread: Re: storing related structs
- Next by thread: Re: storing related structs
- Index(es):
Relevant Pages
|
|