| | | | | |

Implementing BitVector - 4

void BitVector::Set (size_t index)
// set specified bit
{ 
  byteArray_[ByteNumber(index)] |= Mask(index);                                                
}

int BitVector::Test  (size_t index) const  
// return specified bit value
{
  return 0 != (byteArray_[ByteNumber(index)] & Mask(index));
}

| | Top of Page | 2. A BitVector Class - 9 of 10