title: expected constructor, destructor, or type conversion before ‘(’ token
body: <p>Compiling <code>polygone.h</code> and <code>polygone.cc</code> gives error:</p>
  
  <pre><code>polygone.cc:5:19: error: expected constructor, destructor, or type conversion before ‘(’ token
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>//polygone.h
  # if !defined(__POLYGONE_H__)
  # define __POLYGONE_H__
  
  # include &lt;iostream&gt;
  
  class Polygone {
  
      public:
          Polygone(){};
          Polygone(std::string fichier);
  
  };
  
  # endif
  </code></pre>
  
  <p>and </p>
  
  <pre><code>//polygone.cc
  # include &lt;iostream&gt;
  # include &lt;fstream&gt;
  # include "polygone.h"
  
  Polygone::Polygone(string nom)
  {
      std::ifstream fichier (nom, ios::in);
      std::string line;
  
      if (fichier.is_open())
      {
          while ( fichier.good() )
          {
              getline (fichier, line);
              std::cout &lt;&lt; line &lt;&lt; std::endl;
          }
      }
      else
      {
          std::cerr &lt;&lt; "Erreur a l'ouverture du fichier" &lt;&lt; std::endl;
      }
  }
  
  //ifstream fich1 (argv[1], ios::in);
  </code></pre>
  
  <p>My guess is that the compiler is not recognising <code>Polygone::Polygone(string nom)</code> as a constructor, but, if this actually is the case, I have no idea why.</p>
  
  <p>Any help?</p>