Did you read the replies you were given? They answer your question.
If you're not interested in reading what people tell you about unions, then perhaps you shouldn't bother with unions. Change the union to struct and the "weirdness" will vanish.
Did you read the replies you were given? They answer your question.
If you're not interested in reading what people tell you about unions, then perhaps you shouldn't bother with unions. Change the union to struct and the "weirdness" will vanish.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)