This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

binary enum

Given

enum
{
  VAL1,
  VAL2,
  VAL3,
  VAL4
};

results in VAL1 = 0, VAL2 = 1, VAL3 = 2, VAL4 = 3.

What enum would create binary incremental values?

VAL1 = 1, VAL2 = 2, VAL3 = 4, VAL4 = 8