title: C2039: Class is not a member of Namespace
body: <p><strong>Mage/Interface/Context.h</strong></p>
  
  <pre><code>#pragma once
  
  #include &lt;Mage/Interface/Element.h&gt;
  #include &lt;Mage/Renderer/RenderingContext.h&gt;
  #include &lt;Mage/Renderer/VertexBuffer.h&gt;
  
  #include &lt;glm/glm.hpp&gt;
  
  namespace Mage {
      namespace Interface {
          class Context {
  
          protected:
              RenderingContext* ctx;
              VertexBuffer* vbo;
              glm::mat4 projection;
              Mage::Interface::Frame* uiParent;
  
          public:
              Context(RenderingContext* ctx);
              ~Context();
  
              void render();
              Mage::Interface::Frame* createFrame();
          };
      }
  }
  </code></pre>
  
  <p><strong>Mage/Interface/Element.h</strong></p>
  
  <pre><code>#pragma once
  
  #include &lt;vector&gt;
  
  #include &lt;Mage/Interface/Context.h&gt;
  
  #include &lt;glm/glm.hpp&gt;
  
  namespace Mage {
      namespace Interface {
          class Element {
  
          protected:
              Mage::Interface::Context* ctx;
              std::vector&lt;Element*&gt; children;
              glm::vec3 position;
              float scale;
  
          public:
              virtual void draw();
  
              void attach(Element* child) {
                  this-&gt;children.push_back(child);
              }
  
              inline glm::vec3 getPosition() {
                  return this-&gt;position;
              }
  
              float getScale() {
                  return this-&gt;scale;
              }
          };
  
          // Frame is an untextured, single colour quad. Frame may contain other
          // Elements.
          class Frame : public Element {
  
          public:
              Frame();
              Frame(glm::vec3 pos);
              Frame(float width, float height);
              Frame(glm::vec3 pos, float width, float height);
          };
      }
  }
  </code></pre>
  
  <p>This gives me the following errors:</p>
  
  <pre><code>Error   C2039   'Context': is not a member of 'Mage::Interface' Mage2D  c:\users\jesse\documents\visual studio 2015\projects\mage2d\include\mage\interface\element.h    14
  
  Error   C2238   unexpected token(s) preceding ';'   Mage2D  c:\users\jesse\documents\visual studio 2015\projects\mage2d\include\mage\interface\element.h    14
  
  Error   C2143   syntax error: missing ';' before '*'    Mage2D  c:\users\jesse\documents\visual studio 2015\projects\mage2d\include\mage\interface\element.h    14
  
  Error   C4430   missing type specifier - int assumed. Note: C++ does not support default-int    Mage2D  c:\users\jesse\documents\visual studio 2015\projects\mage2d\include\mage\interface\element.h    14
  </code></pre>
  
  <p>When I take out <code>Mage::Interface::Context* ctx</code>, the code compiles fine. I figured I must have missed a semi colon, but I can't see it - it all seems to check out just fine to me.</p>