Set the value of a particular bit of a large number.
Signature
void SetBit( size_t bit, short value )
Parameters
Name
Type
Description
bit
size_t
The index of the bit to be set. The index is zero relative, beginning with the
least significant bit.
value
short
1 to set the bit, 0 to clear it.
Returns
( none )
Example
ln X;
...
X.SetBit( 0, 1 ); // make X odd
Notes
This function does not adjust the size of the large number. If you set a bit in a
digit that is not used, the value of the large number will appear to be unchanged.
It is the programmer's responsibility to adjust the size of the large number
appropriately. See NumBits, GetSize,
and SetSize.