I have the following attribute in my class:
bool a ;
bool b ;
bool c ;
All the attributes are Boolean arrays. I have to pack them to reduce space. Is it possible in C++? (I know it is possible in ADA.) If so, can you please let me know how I can achieve that?
In Visual C++ and Win32 development, these Boolean values will take up four bytes a piece. If you need to pack the data, you're much better off looking at a bit field representation.
Dig Deeper on C# programming language
Related Q&A from John Robbins
What is a JAD session? This term is referred to often in job postings and seems like some kind of brainstorm you carry out with a client to define IT... Continue Reading