//Derived from the example
void Foo(uint num)
{
switch(num)
{
case 0:
// No toggles active
break;
case 1:
// First toggle is active
break;
case 3:
// First and Second toggle are active
break;
case 7:
// First, second and third toggles are active
break;
case 15:
// 1st, 2nd, 3rd, 4th toggles are active
break;
case 31:
// 1st, 2nd, 3rd, 4th, 5th toggles are active
break;
//etc.
}
}
//Derived from the example
void Foo(uint num)
{
switch(num)
{
case 0:
// No toggles active
break;
case 1:
// First toggle is active
break;
case 3:
// First and Second toggle are active
break;
case 7:
// First, second and third toggles are active
break;
case 15:
// 1st, 2nd, 3rd, 4th toggles are active
break;
case 31:
// 1st, 2nd, 3rd, 4th, 5th toggles are active
break;
//etc.
}
}