title: How do I use the Enum value from a class in another part of code?
body: <p>Coming from a C# background from a night course at a local college, I've sort of started my way in C++. Having a lot pain getting used to the syntax. I'm also still very green when it comes to coding techniques.</p>
  
  <p>From my <code>WinMain</code> function, I want to be able to access a variable which is using an enum I declared in another class.</p>
  
  <pre><code>(inside core.h)
  class Core
  {
      public:
      enum GAME_MODE
      {
          INIT,
          MENUS,
          GAMEPLAY
      };
      GAME_MODE gameMode;
  
      Core();
      ~Core();
      ...OtherFunctions();
  };
  
  (inside main.cpp)
  Core core;
  int WINAPI WinMain(...)
  {
      ... startup code here...
  
      core.gameMode = Core.GAME_MODE.INIT;
  
      ...etc...
  }
  </code></pre>
  
  <p>Basically I want to set that gameMode to the enum value of <code>Init</code> or something like that from my <code>WinMain</code> function. I want to also be able to read it from other areas.</p>
  
  <p>I get the error...</p>
  
  <pre><code>expected primary-expression before '.' token
  </code></pre>
  
  <p>If I try to use <code>core.gameMode = Core::GAME_MODE.INIT;</code>, then I get the same error.</p>
  
  <p>I'm not fussed about best practices, as I'm just trying to get the basic understanding of passing around variables in C++ between files.  I'll be making sure variables are protected and neatly tucked away later on once I am use to the flexibility of the syntax.</p>
  
  <p>If I remember correctly, C# allowed me to use Enums from other classes, and all I had to do was something like <code>Core.ENUMNAME.ENUMVALUE</code>.</p>
  
  <p>I hope what I'm wanting to do is clear :\  As I have no idea what a lot of the correct terminology is.</p>