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 please let me know how I can achieve that.
Looking at your example, it's not easy to imagine an alternative structure that would be more efficient and faster for processing than what you have.
If you had LARGE data sets that are sparsely populated, you could use a table with a 2 part key and a value. (Example: key = boola + index, value = 1 or 0)
MORE INFORMATION ON THIS TOPIC
Ask your Web development questions--or help out your peers by answering them--in our live discussion forums.
The Best Web Links: tips, tutorials and more.
Check out this live Q&A with Dave Slater and Jim Mason, How to best get started with WebSphere Development Tools.
Related Q&A from Jim Mason
Java to Excel with the AS400 may be attractive, but if you have complex VBA macros in Excel, the JDBCODBC bridge will not work well for you. A better...continue reading
There are a couple of options for accessing AS/400 data, from the old way using Client Access ODBC drivers, to Java, to a new application from Groovy.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.