Dan Pop said:
Because the question doesn't deserve a better answer *here*. The
answer is to be found in any decent C tutorial book, which is mandatory
reading *before* posting here.
Whether it "deserves" a better answer, in your jaded opinion, the
fact is that the OP has been fortunate enough to *receive* a better
answer, thanks to the likes of Chris Torek et al; and not thanks
to you. IMO the question is perfectly appropriate for clc (once
rendered appropriate, by s/classes/structs/, that is).
If you have no answer to offer, only insults, then the rules of
Netiquette require that you keep your trap shut, Dan. You ought
to know that.
His question suggests the very opposite, so your "presumably" is fully
unwarranted. Someone understanding the difference between structures
and unions would not phrase his question like this.
^^^^^^^^^^^^^^^^^^^^^^
You contradicting yourself now: the OP knows they are different things
but he doesn't know the difference. If he doesn't know the difference,
then how does he know they are different things?
Not at all. The OP may know that they are different, due to the
rabid insistence by pedants like yourself, but may not understand
why or how they are different.
Again, this is C textbook stuff, completely inappropriate for the
newsgroup, unless the poster explicitly mentions that, *after* reading
the relevant chapter(s) from his book, he still does not understand the
difference and/or the need for using unions.
Frankly, I haven't seen a C textbook that really addresses the
interesting fact that structs could be used in place of unions
without changing the behaviour, in all but an important minority
of cases. Merely understanding the semantics of unions and structs
may not be enough to realize this subtlety; thus, it seems quite
appropriate to discuss it here. Without calling anyone an "idiot".
Furthermore, any smiley in
such a request is misplaced.
Oh, so you'll criticize the use of smileys, but then you'll go ahead
and pepper your own output with "idiot" and other gratuitous insults.
Frankly, the quality of Usenet in general, and this newsgroup in
particular, would be much more positively impacted if you -- and I'd
say "you and all the others who engage in gratuitous insults", but
really it's pretty consistently just you, Dan; I hate to imagine what
the personal issues might be, behind your facade -- would keep your
insults to yourself, than if every smiley was automatically deleted.
Your style of "conversation" would be appropriate in, say, alt.flame.
Smileys are (often) annoying in a technical forum, but they don't really
matter. Gratuitous insults and personal attacks, OTOH, really do bring
an undesirable element into a technical forum, one which the "regulars"
ought to know better than to introduce even if an occasional rogue or
clueless one takes that low road.
Clean up your style, Dan, it is *quite* inappropriate for clc.
Just pretend that every question, clueless or not, was asked by
someone interviewing you for a job.