title: Explain the error: ISO C++ forbids declaration of `Personlist' with no type
body: <p>I have a class which is going to handle an array of objects of another class I've created earlier (which works fine). The problem appears when I try to create an object of my List-class.</p>
  
  <p>This is the header of the list-class:</p>
  
  <pre><code>#ifndef personlistH
  #define personlistH
  #include "Person.h"
  #include &lt;iomanip&gt;
  #include &lt;iostream&gt;
  #define SIZE 10
  
  namespace std {
  
      class PersonList {
  private:
      Person persons[SIZE];
      int arrnum;
      string filename;
  
  public:
      Personlist();
      };
  }
  #endif
  </code></pre>
  
  <p>This is the main function:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include "PersonList.h"
  
  using namespace std;
  
  int main() {
  
  PersonList personlist;
  
  return 0;   
  }
  </code></pre>
  
  <p>The error my compiler is giving me is the following:</p>
  
  <blockquote>
    <p>error: "27 \PersonList.h ISO C++ forbids declaration of `Personlist'
    with no type"</p>
  </blockquote>
  
  <p>I've searched for answers but as I'm quite new to C++ it's been a bit confusing and I haven't found any fitting yet. It would be great if you could explain this error for me.</p>