It took me some long time to comprehend the issues involved in using unions, structs, and bit fields in C and C++.
First, for the definition of unions and structs, take a look at this link:
Unions could be used together with structs to reinterpret the same location in memory with different interpretations (similar in spirit to the C++ reinterpret_cast). For examples on this see:
C++ extends the unions and structs, for example see:
Bit fields are used to define special-sized integers. This is useful for packing data (e.g. flags) together into one memory location. This, however, is a bad habit and should be avoided as the compiler-generated code to access bit fields is usually inefficient! For more examples on this, see:
Finally, unions and structs could be anonymous! You do not have to give a name to a union. In this case its members become directly accessible within the same scope. Wikipedia calls this "untagged union". For an example see:
Today I tried to compile and install the WFDB tools from the PhysioToolkit ( PhysioNet ) on my Debian Squeeze system. I am documen...
Recently I needed to add a header/footer to an existing PDF file. With some help from this link, I figured it out: http://coding.derkeiler.c...
Bugzilla is a great project. Yet, customizing it to your needs is an overwhelming task! I was assigned a task that our Bugzilla server shou...
Biomedical Engineering make extensive use of software. Signal processing algorithms and other aspects of the biomedical engineering needs ex...
I was very disappointed by the poor sound capabilities of the GNU Ocatve project compared to MATLAB. The playaudio() function was inconveni...