user33584: When I compile this code I get a  error: 'currentState' was not declared in this scope.
The code:
enum state: int
 {
  NOTREADY,
  WAITSTARTUP,
  WAITSECRET,
  REVEALSECRET
 }

state currentState; <---- Error

const int BUTTONPIN = 4;
const int ROTARYPIN = A0;

void setup() 
{
  //Open Serial Monitor for debugging purposes
  Serial.begin(9600);

  //Configure the pins
  pinMode(BUTTONPIN, INPUT);
  pinMode(ROTARYPIN, INPUT);

  //Initialise the LCD
  lcd.begin(16, 2);

  //Assume that the current state is wait for start up signal

  currentState=WAITSTARTUP;
}


user23841: You have missing semicolon after the enum:
enum state: int
 {
  NOTREADY,
  WAITSTARTUP,
  WAITSECRET,
  REVEALSECRET
 };  // <-- here 


33584: <p>When I compile this code I get a  error: 'currentState' was not declared in this scope.</p>

<p>The code:</p>

<pre><code>enum state: int
 {
  NOTREADY,
  WAITSTARTUP,
  WAITSECRET,
  REVEALSECRET
 }

state currentState; &lt;---- Error

const int BUTTONPIN = 4;
const int ROTARYPIN = A0;

void setup() 
{
  //Open Serial Monitor for debugging purposes
  Serial.begin(9600);

  //Configure the pins
  pinMode(BUTTONPIN, INPUT);
  pinMode(ROTARYPIN, INPUT);

  //Initialise the LCD
  lcd.begin(16, 2);

  //Assume that the current state is wait for start up signal

  currentState=WAITSTARTUP;
}
</code></pre>
 23841: <p>You have missing semicolon after the enum:</p>

<pre><code>enum state: int
 {
  NOTREADY,
  WAITSTARTUP,
  WAITSECRET,
  REVEALSECRET
 };  // &lt;-- here 
</code></pre>
