Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C++
Unions vs Classes
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="JKop, post: 1496997"] posted: union { unsigned int FourBytes; struct { unsigned char Byte1; unsigned char Byte2; unsigned char Byte3; unsigned char Byte4; }; } blind; int main(void) { blind.FourBytes = 0x1F1F1F1F; //Now, check each individual byte if (Byte1 == } I did this before in a program I was writing. Can't remember why I did it, or which numbers I used! I'd still have it tucked away in my archive though (Actually, just right now as I'm writing this I thought of the reason, I was encoding digital audio to be sent down to a CD-Writer, and had to know the ENDINESS). -JKop [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C++
Unions vs Classes
Top