title: Very basic inheritance: error: expected class-name before ‘{’ token
body: <p>I'm trying to learn c++ and I've stumbled upon a error while trying to figuring out inheritance.</p>
  
  <p>Compiling: daughter.cpp
  In file included from /home/jonas/kodning/testing/daughter.cpp:1:
  /home/jonas/kodning/testing/daughter.h:6: error: expected class-name before ‘{’ token
  Process terminated with status 1 (0 minutes, 0 seconds)
  1 errors, 0 warnings</p>
  
  <p>My files:
  main.cpp:</p>
  
  <pre><code>#include "mother.h"
  #include "daughter.h"
  #include &lt;iostream&gt;
  using namespace std;
  
  int main()
  {
      cout &lt;&lt; "Hello world!" &lt;&lt; endl;
      mother mom;
      mom.saywhat();
      return 0;
  }
  </code></pre>
  
  <p>mother.cpp:</p>
  
  <pre><code>#include "mother.h"
  #include "daughter.h"
  
  #include &lt;iostream&gt;
  
  using namespace std;
  
  
  mother::mother()
  {
      //ctor
  }
  
  
  void mother::saywhat() {
  
      cout &lt;&lt; "WHAAAAAAT" &lt;&lt; endl;
  
  
  }
  </code></pre>
  
  <p>mother.h:</p>
  
  <pre><code>#ifndef MOTHER_H
  #define MOTHER_H
  
  
  class mother
  {
      public:
          mother();
          void saywhat();
      protected:
      private:
  };
  
  #endif // MOTHER_H
  </code></pre>
  
  <p>daughter.h: </p>
  
  <pre><code>#ifndef DAUGHTER_H
  #define DAUGHTER_H
  
  
  class daughter: public mother
  {
      public:
          daughter();
      protected:
      private:
  };
  
  #endif // DAUGHTER_H
  </code></pre>
  
  <p>and daughter.cpp:</p>
  
  <pre><code>#include "daughter.h"
  #include "mother.h"
  
  #include &lt;iostream&gt;
  
  using namespace std;
  
  
  daughter::daughter()
  {
      //ctor
  }
  </code></pre>
  
  <p>What I want to do is to let daughter inherit everything public from the mother class (=saywhat()). What am I doing wrong?</p>