[SDL] Event union...oh i get it!
Christopher Subich
csubich at subich.com
Sun Oct 20 20:26:01 PDT 2002
At 10:59 PM 10/20/02 +0000, you wrote:
>Fellow humans,
> Ok, I think I understand. So referencing event.type is, really, just
> a user-friendly reference to a specific place in memory. And, because
Everything in C is a user-friendly reference to a specific place in memory.
Except for the things that are unfriendly references to a specific place in
memory.
> On a side note, I see why people get so frustrated with C at times...I
> imagine an innapropriate reference to a union member could be a
> debugging nightmare.
To put it mildly, yes. :)
Although when done correctly, as in SDL, something like this is an elegant
solution to the problem.
More information about the SDL
mailing list