title: use of undefined type c++ , class
body: <p>I have a problem, the Rectangle class is not working properly in TwoDimTree.h 
  For example,
  "Rectangle Extent;" seems like working ,but when i try to use it it says no member class found.</p>
  
  <p>I want to use it like "Extent.get_Top;" , but i cant make it.</p>
  
  <p>Also in the error list i got.
  Error 7 error C2027: use of undefined type 'Rectangle'  </p>
  
  <p>My headers are below.I really couldn't find my mistake.Thanks for the help.</p>
  
  <p>My TwoDimTree.h</p>
  
  <pre><code>#include &lt;string&gt;
  #include "Rectangle.h"
  #include "LinkedList.h"
  using namespace std;
  class TwoDimTreeNode
  {
  public:
      TwoDimTreeNode(Rectangle,TwoDimTreeNode*,TwoDimTreeNode*,TwoDimTreeNode*,TwoDimTreeNode*,LinkedList&lt;Rectangle&gt;,LinkedList&lt;Rectangle&gt;);
      TwoDimTreeNode(Rectangle);
      Rectangle get_Extent();
  private:
      Rectangle Extent;
      LinkedList &lt;Rectangle&gt; Vertical;
      LinkedList &lt;Rectangle&gt; Horizontal;
      TwoDimTreeNode*TopLeft;
      TwoDimTreeNode*TopRight;
      TwoDimTreeNode*BottomLeft;
      TwoDimTreeNode*BottomRight;
  
  
      friend class Rectangle;
      friend class LinkedList&lt;Rectangle&gt;;
  };
  </code></pre>
  
  <p>My Rectangle.h</p>
  
  <pre><code>#include &lt;string&gt;
  #include "TwoDimTreeNode.h"
  #include "LinkedList.h"
  
  using namespace std;
  class Rectangle {
  public:
      Rectangle(int,int,int,int);
  int get_Top();
      void set_Top(int);
  private:
      int Top;
      int Bottom;
      int Right;
      int Left;
  
      friend class TwoDimTreeNode;
      friend class LinkedList&lt;Rectangle&gt;;
  
  };
  </code></pre>
  
  <p>My Linkedlist.h</p>
  
  <pre><code>#include &lt;string&gt;
  #include "Rectangle.h"
  #include "TwoDimTreeNode.h"
  using namespace std;
  
  template &lt;class Object&gt;
  struct node
  {
      Object element;
      node*next;
      node(const Object &amp; theElement = Object(),node*n=NULL)
          :element(theElement), next(n){}
      friend class Rectangle;
      friend class TwoDimTreeNode;
  };
  template &lt;class Object&gt;
  class LinkedList
  {
  public:
      LinkedList();
      int get_Length();
      Object search(int,int);
      bool check_Rectangle(Object);
  private:
  
      int length;
      node&lt;Object&gt;*head;
  
  };
  </code></pre>