Quote:
|
Originally Posted by Rick
if (flags & (flag1 | flag2))
|
uhhhhhhh... not really what I meant.
you could have
100000000000000000000000000000001
or
000000000000000010000000000000000
I mean, of course I would know the range of this flag. it certainly wouldn't take all 32 places.
What would be the best way to detect if there is more than one value stored in it though?
for (i=0; i<flagsize; i++) {
if (flag & 2^i)
this.flagcounter++;
if (this.flagcounter == 2)
return true;
}
return false;