R
rudra
Dear friends,
i am in mess with bitset again. i have managed to write a messy code
which checks the machine bitsize and then wants to do a bitflip. here
is the code:
int bit;
if (strncmp(sysptr, "i686",4)==0)
{
bit=32;
}
......
bitset<32> i (0);
....etc.
where in bitset is equal to bit,which is 32. but i tried to write the
bitset as *bitset<bit> i (0);*(i.e. to read the bit)
where its giving the error:error: ‘bit’ cannot appear in a constant-
expression
can you tell me a way to make that possible?
i am in mess with bitset again. i have managed to write a messy code
which checks the machine bitsize and then wants to do a bitflip. here
is the code:
int bit;
if (strncmp(sysptr, "i686",4)==0)
{
bit=32;
}
......
bitset<32> i (0);
....etc.
where in bitset is equal to bit,which is 32. but i tried to write the
bitset as *bitset<bit> i (0);*(i.e. to read the bit)
where its giving the error:error: ‘bit’ cannot appear in a constant-
expression
can you tell me a way to make that possible?