title: Trying to set up a class thru .h and .cpp files -- why do I get these errors?
body: <p>I'm using <code>g++</code> on Debian 8.2 Jessie.</p>
  
  <p>I'm learning about classes in C++. I think I understand the basics, but not fully how to instantiate class objects with header files.</p>
  
  <p>Here's <code>Movie.h</code>:</p>
  
  <pre><code>#ifndef MOVIE_H
  #define MOVIE_H
  
  #include &lt;string&gt;
  #include &lt;iostream&gt;
  
  class Movie
  {
  private:
      std::string     m_title;
      int             m_releaseYear;
      std::string     m_description;
  public:
      Movie(std::string &amp;title, int releaseYear, std::string &amp;description);
      ~Movie()
      {
          std::cout &lt;&lt; "\nDestructor called\n";
      }
  
      void        setMovieInfo(std::string &amp;title, int releaseYear, std::string &amp;description);
  
      std::string getTitle();
      int         getReleaseYear();
      std::string getDescription();
      void        printInfo();
  };
  
  #endif
  </code></pre>
  
  <p>Then there's <code>Movie.cpp</code>:</p>
  
  <pre><code>#include "Movie.h"
  
  // Movie constructor
  Movie::Movie(std::string &amp;title, int releaseYear, std::string &amp;description)
  {
      setMovieInfo(std::string &amp;title, int releaseYear, std::string &amp;description);
  }
  
  // Movie mem function
  void Movie::setMovieInfo(const std::string &amp;title, const int releaseYear, const std::string &amp;description)
  {
      m_title=            title;
      m_releaseYear=      releaseYear;
      m_description=      description;
  }
  
  std::string Movie::getTitle()
  {
      return m_title;
  }
  
  int Movie::getReleaseYear()
  {
      return m_releaseYear;
  }
  
  std::string Movie::getDescription()
  {
      return m_description;
  }
  
  void Movie::printInfo()
  {
      std::cout &lt;&lt; "Title: " &lt;&lt; m_title &lt;&lt; '\n';
      std::cout &lt;&lt; "Year: " &lt;&lt; m_releaseYear &lt;&lt; '\n';
      std::cout &lt;&lt; "Description" &lt;&lt; m_description &lt;&lt; '\n';
  }
  </code></pre>
  
  <p>And <code>main.cpp</code>:</p>
  
  <pre><code>#include "Movie.h"
  
  int main(){
      std::string     title;
      int             releaseYear;
      std::string     description;
  
      title=          "Blade Runner";
      releaseYear=    1982;
      description=    "Harrison Ford's character hunts a group of runaway four-year-olds.";
  
      Movie bladeRunner(title, releaseYear, description);
      bladeRunner.printInfo();
  
      return 0;
  }
  </code></pre>
  
  <p>I ran <code>g++ -Wall Movie.cpp main.cpp -o main.sh &amp;&amp; ./main.sh</code>, but got this output:</p>
  
  <pre><code>Movie.cpp: In constructor ‘Movie::Movie(std::string&amp;, int, std::string&amp;)’:
  Movie.cpp:6:27: error: expected primary-expression before ‘&amp;’ token
    setMovieInfo(std::string &amp;title, int releaseYear, std::string &amp;description);
                             ^
  Movie.cpp:6:35: error: expected primary-expression before ‘int’
    setMovieInfo(std::string &amp;title, int releaseYear, std::string &amp;description);
                                     ^
  Movie.cpp:6:64: error: expected primary-expression before ‘&amp;’ token
    setMovieInfo(std::string &amp;title, int releaseYear, std::string &amp;description);
                                                                  ^
  Movie.cpp: At global scope:
  Movie.cpp:10:6: error: prototype for ‘void Movie::setMovieInfo(const string&amp;, int, const string&amp;)’ does not match any in class ‘Movie’
   void Movie::setMovieInfo(const std::string &amp;title, const int releaseYear, const std::string &amp;description)
        ^
  In file included from Movie.cpp:1:0:
  Movie.h:20:8: error: candidate is: void Movie::setMovieInfo(std::string&amp;, int, std::string&amp;)
    void  setMovieInfo(std::string &amp;title, int releaseYear, std::string &amp;description);
          ^
  </code></pre>