I'm creating a new enum:
enum WState {SLEEPING=2, WAITING_FOR_DATA=3, SENDING=4, IDLE=5, ERROR=6};
Then I'm trying to initialize a variable of that enum type to a default state straight after.
WState CurrentState = WState::ERROR;
I can't figure out the correct syntax or maybe I'm missing some vital keywords when searching for an answer. It says:
data member initializer not allowed