Enum value in C++
- by Sunil
enum AccessSource
{
AccessSourceNull = 0x00000001,
AccessSourceSec = 0x00000002,
AccessSourceIpo = 0x00000004,
AccessSourceSSA = 0x00000008,
AccessSourceUpgrade = 0x00000010,
AccessSourceDelta = 0x00000020,
AccessSourcePhoneM = 0x00000040,
AccessSourceSoft = 0x00000080,
AccessSourceCR = 0x00000100,
AccessSourceA = 0x00000200,
AccessSourceE = 0x00000400,
AccessSourceAll = 0xFFFFFFFF
};
What is the value of AccessSourceAll ?? is it -1? or is it maximum value?
I have a parameter ULONG x , whose default value is AccessSourceAll(that means access to all). How do i remove the access right of AccessSourceE only?
How to add the access right of AccessSourceE again?
If i have a particular value in x, then how do i know whether AccessSourceE is set or not?