title: Does not name a type error
body: <p>This is the dumbest little problem I am having and I CANNOT find the reason.</p>
  <p>I am aware that there are dozens and dozens of this error already asked, but every one I read was about the order of declaration, however, I declare my struct before I use it in a function, and still get the error.</p>
  <p>Here is the header file:</p>
  <pre><code>#ifndef GRAPH_H
  #define GRAPH_H
  
  
  #include &lt;iostream&gt;
  #include &lt;string&gt;
  using namespace std;
  
  class Graph {
  
      public:
      struct Room;
  
      // destructor
      ~Graph();
  
      // copy constructor
      Graph(const Graph &amp;v);
  
      // assignment operator
      Graph &amp; operator = (const Graph &amp;v);
  
      //Create an empty graph with a potential
      //size of num rooms.
      Graph( int num );
  
      //Input the form:
      //int -- numRooms times
      //(myNumber north east south west) -- numRooms times.
      void input(istream &amp; s);
  
      //outputs the graph as a visual layout
      void output(ostream &amp; s , string str );
  
      //Recursively searches for an exit path.
      void findPath( Room * start );
  
      //Moves room N E S or W
      void move( Room * room , string direction );
  
      //inputs the starting location.
      void inputStart( int start );
  
      //Searches the easyDelete array for the room with the
      //number &quot;roomNumber&quot; and returns a pointer to it.
      Room * findRoom( int roomNumber );
  
      struct Room
      {
          bool visited;
          int myNumber;
  
          Room *North;
          Room *East;
          Room *South;
          Room *West;
      };
  
      private:
  
      int numRooms;
      int _index;
      int _start;
  
      Room ** easyDelete;
      string * escapePath;
  
      Room * theWALL;
      Room * safety;
  };
  
  #endif
  </code></pre>
  <hr />
  <p>The specific error is: error: &quot;Room&quot; does not name a type, and it is talking about my</p>
  <pre><code>Room * findRoom( int roomNumber );
  </code></pre>
  <p>function, which is supposed to return a pointer to a &quot;Room.&quot; <strong>I have tried putting the actual definition of the struct where the &quot;struct Room;&quot; is, to no avail.</strong></p>
  <h1>Edit: My apologies, it's in my .C file when I use it:</h1>
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &quot;Graph.h&quot;
  using namespace std;
  
  ...
  
  Room * Graph::findRoom( int roomNumber )
  {
      ...
  }
  </code></pre>