title: Why am I getting "is not a class or namespace" error
body: <p>I have a file that is generating the error</p>
  
  <pre><code>"Block" is not a class or a namespace name
  </code></pre>
  
  <p>on the line</p>
  
  <pre><code>typedef Block::point point;
  </code></pre>
  
  <p>However, I'm positive that it's a class that I've both created and #included in the file below </p>
  
  <p>'texture.h'.</p>
  
  <pre><code>    #pragma once
  #include "Block.h"
  #include &lt;iostream&gt;
  #include &lt;vector&gt;
  #include &lt;GL/glut.h&gt;
  #include "lodepng.h"
  
  using namespace std;
  typedef Block::point point;
  
  
  class Texture
  {
  
  
  
  public:
      Texture(int width, int height, string filename);//initialises our texture and loads its pixeldata into a buffer
      Texture(void);
      ~Texture(void);
  
      void draw(point centerPoint, point dimensions);
  
      unsigned int w;//width of our imagefile
      unsigned int h;
  
      GLuint texID;//the ID we will give OGL for this particular texture.
  
  private:
      vector&lt;unsigned char&gt; image;
      void texGLInit();
  };
  </code></pre>
  
  <p>Also just for good measure, here is the block.h file in question.</p>
  
  <pre><code>#pragma once
  #include &lt;GL/glut.h&gt; 
  #include &lt;math.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include "Texture.h"
  
  class Block
  {
  
  
  public:
      struct point
      {
          GLfloat x, y;
      };
  
      enum State  {STATIC, FALLING, SELECTED};
  
      enum Colour {RED, BLUE, PURPLE, GREEN, YELLOW, DEAD};
  
      Block(void);
      ~Block(void);
  
      Block(int gridPosX, int gridPosY, point offset);
      point gridPos;//the blocks designated position in the 8x8 array
      point centerPos;//the blocks coordinates for the actual purpose of drawing
  
      State blockState;//the state of the block
      Colour blockColour;//the colour of the block
  
      void move();//checks whether the block is in a falling state and moves it appropriately
      void drawBlock();//no need to include the drawing coords as parameters. the block knows where it should be. The grid will simply tell it to draw itself.
  
  private:
      void fall();//decrements the blocks position
      void assignRandomColour();//assigns a random colour to the block dependant upon its' texture
      void generateWorldPos();//gets our block a center position, for us to later to use to draw it.
      //the above function will also inherently define the size of each cell in the grid. I'm thinking each
      //cell should be 40x40. So each cell will be offset initially by 20px by 20px. 
  
  
  
      point gridOffset;
  
  
  
  };
  </code></pre>
  
  <p>I have no idea as to why i could be getting this error for a class that certainly exists.
  Thanks in advance.</p>