In C++, are bitsets actually a set of bools? Doesn’t this defeat the purpose of using a BitSet because bools are 32 bits (I think…)?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
They represent a collection of
bool‘s, but those values are really stored as bits in anunsigned long.The size of a
boolis not necessary any number of bits, neither is anunsigned long. (Though the minimum number of bits for any data type is 8, and for anunsigned longit must be at least 32.)