title: C++ Constexpr not declared in this scope
body: <p>I am working on a project for one of the classes on Udemy.com and keep getting this error;</p>
  
  <p>/home/scott/bullcowgame/src/main.cc:40:3: error: ‘constexpr’ was not declared in this scope
  /home/scott/bullcowgame/src/main.cc:40:13: error: expected ‘;’ before ‘int’
  /home/scott/bullcowgame/src/main.cc:42:35: error: ‘WORD_LENGTH’ was not declared in this scope</p>
  
  <p>this is my code </p>
  
  <pre><code>    #include &lt;iostream&gt;
  #include &lt;string&gt;
  using namespace std;
  
  void PrintIntro();
  string GetGuessAndPrintBack();
  
  
  // the entry point for our application
   int main()
   {
      PrintIntro();
      GetGuessAndPrintBack();
      GetGuessAndPrintBack();
  
      cout &lt;&lt; endl;
      return 0;
  }
  
  // introduce the game
  void PrintIntro() {
      constexpr int WORD_LENGTH = 9;
      cout &lt;&lt; "Welcome to Bulls and Cows, a fun word game.\n";
      cout &lt;&lt; "Can you guess the " &lt;&lt; WORD_LENGTH;
      cout &lt;&lt; " letter isogram I'm thinking of?\n";
      cout &lt;&lt; endl;
      return;
  }
  
  
  // get a guess from the player
  string GetGuessAndPrintBack() {
      cout &lt;&lt; "Enter your guess: ";
      string Guess = "";
      getline(cin, Guess);
  
      // print the guess back
      cout &lt;&lt; "Your guess was: " &lt;&lt; Guess &lt;&lt; endl;
  
      return Guess;
  } 
  </code></pre>
  
  <p>I am using the Anjuta IDE</p>