|
From: Daniel P. <dan...@st...> - 2006-03-18 10:16:41
|
A tip. double the value for each flag, 1 2 4 8 etc ex: 1 + 4 =3D 00000101 to check weither the flag has been set just use "and" ex: check for=20 4: isFlagSet =3D 4 & flags; it will become 1 if the flag is set and 0 otherwise /Daniel Pettersson Noorez Kassam wrote: > I have a question about flags. Here's an example of my problem: > > FLAG A =3D 1; > FLAG B =3D 2; > > Lets say both flags are needed, so they are | together like so... A|B.=20 > How can I then find what flags are set later on from the single value? > > _________________________________________________________________ > Take advantage of powerful junk e-mail filters built on patented=20 > Microsoft=AE SmartScreen Technology.=20 > http://join.msn.com/?pgmarket=3Den-ca&page=3Dbyoa/prem&xAPID=3D1994&DI=3D= 1034&SU=3Dhttp://hotmail.com/enca&HL=3DMarket_MSNIS_Taglines=20 > Start enjoying all the benefits of MSN=AE Premium right now and get th= e=20 > first two months FREE*. > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting=20 > language > that extends applications into web and mobile media. Attend the live=20 > webcast > and join the prime developer group breaking into this new coding=20 > territory! > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D110944&bid=3D241720&dat= =3D121642 > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |