title: error: expected ‘)’ before ... (header file constructor)
body: <p>I have this header file for a class Dictionary</p>
  
  <pre><code>#ifndef DICTIONARY_H
  #define DICTIONARY_H
  
  #include &lt;string&gt;
  #include &lt;vector&gt;
  #include &lt;unordered_set&gt;
  
  class Dictionary {
  public:
      Dictionary(string wordFile);
      bool contains(const string&amp; word) const;
      vector&lt;string&gt; get_suggestions(const string&amp; word) const;
  private:
      unordered_set&lt;string&gt; words;
  };
  
  #endif
  </code></pre>
  
  <p>and I'm getting the error "error: expected constructor, destructor, or type conversion before ‘(’ token Dictionary::Dictionary(string wordFile) ". In the .cpp file it looks like this:</p>
  
  <pre><code>#include &lt;string&gt;
  #include &lt;vector&gt;
  #include &lt;fstream&gt;
  #include &lt;iostream&gt;
  #include &lt;algorithm&gt;
  #include "word.h"
  #include "dictionary.h"
  #include &lt;unordered_set&gt;
  #include &lt;string&gt;
  
  Dictionary::Dictionary(string wordFile) {
    string str;
    ifstream input(wordFile);
  
    while (getline(input, str)) {
      words.insert(str);
    }
  }
  
  bool Dictionary::contains(const string&amp; word) const {
    unordered_set&lt;string&gt;::const_iterator got = words.find(word);
    if(got == words.end()){
      return false;
    }
    return true; 
  }
  
  vector&lt;string&gt; Dictionary::get_suggestions(const string&amp; word) const {
    vector&lt;string&gt; suggestions;
    return suggestions;
  }
  </code></pre>
  
  <p>I have no idea what's wrong... I come from a Java background and I'm having some trouble getting accustomed to writing in C++ and fixing these errors.</p>