title: C++ DirectX11 Returning an Enum class
body: <p>Header File:</p>
  
  <pre><code>protected:
  enum class GameState
      {
          nullState
          , firstState
          , secondState
      };
  
  GameState gameState;
  </code></pre>
  
  <p>in the CPP file I want to return the state that gameState is currently at, how do I do this as enum is not a type?</p>
  
  <p>I tried doing:</p>
  
  <pre><code>int ReturnGameState()
  {
      return this-&gt;gameState;
  }
  </code></pre>
  
  <p>because I thought the enums were stored as ints but it says the return types are different.</p>
  
  <p>Thanks.</p>