title: Error C2061 In visual studio
body: <p>I try to reference a struct from another class in my code and it gives me an error, saying I have a syntax problem.</p>
  <pre><code>#pragma once
  
  #include &quot;Definitions.h&quot;
  
  #include &quot;GV.h&quot;
  #include &quot;UI.h&quot;
  #include &quot;Tile.h&quot;
  #include &quot;Item.h&quot;
  
  class Figure {
  public:
      //Figure index
      struct FIGURE_TYPE {
          //Where to crop the image from
          SDL_Rect crop;
          int x;
          int y;
      };
  
      //The game figure
      FIGURE_TYPE figure_index[FIGURE_COUNT];
  
      //The figure array
      int figure_array[MAP_HEIGHT / 64][MAP_WIDTH / 64];
  
      //Functions
      Figure ( void );
      bool draw_figures ( SDL_Surface* screen, SDL_Surface* figures, SDL_Rect camera, Figure::FIGURE_TYPE figure_spec[FIGURE_COUNT] );
  };
  </code></pre>
  <p>That's the struct in Figure.h,</p>
  <pre><code>#pragma once
  
  #include &quot;Definitions.h&quot;
  
  #include &quot;GV.h&quot;
  #include &quot;Tile.h&quot;
  #include &quot;Item.h&quot;
  #include &quot;Figure.h&quot;
  
  class UI {
  public:
      UI ( void );
      void set_camera ( SDL_Rect&amp; camera, Figure::FIGURE_TYPE figure_spec[FIGURE_COUNT] );
      bool draw_map ( SDL_Surface* screen, SDL_Rect&amp; camera, SDL_Surface* tiles, SDL_Surface* figures, Figure::FIGURE_TYPE figure_spec[FIGURE_COUNT] );
      bool draw_status ( void );
  };
  </code></pre>
  <p>And that is where I reference it, from another header file called UI.h. I know there is a problem with referencing structures, I just don't know how to fix it. Simple problem, any one wanna help?</p>
  <p>The problem <strong>is not</strong> that Figure Type is declared outside of Figure.h, or that it is private as opposed to public.</p>
  <h1>Error Reports</h1>
  <blockquote>
  <p>Error 1   error C2653: 'Figure' : is not a class or namespace name    c:\users\jim\documents\c++\roguelike\roguelike\ui.h 13  1   roguelike</p>
  <p>Error 3   error C2653: 'Figure' : is not a class or namespace name    c:\users\jim\documents\c++\roguelike\roguelike\ui.h 14  1   roguelike</p>
  <p>Error 2   error C2061: syntax error : identifier 'FIGURE_TYPE'    c:\users\jim\documents\c++\roguelike\roguelike\ui.h 13  1   roguelike</p>
  <p>Error 4   error C2061: syntax error : identifier 'FIGURE_TYPE'    c:\users\jim\documents\c++\roguelike\roguelike\ui.h 14  1   roguelike</p>
  </blockquote>