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
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.