title: error: expected unqualified-id before ‘int’
body: <p>I'm getting the following error when I try to compile my code. I've read through other questions from people who get the same error but none of the answers are relevant to me.</p>
  
  <pre><code>user.cpp:15:7: error: expected unqualified-id before ‘int’
    User(int user_id, string user_name, int user_year, int user_zip)
         ^
  user.cpp:15:7: error: expected ‘)’ before ‘int’
  </code></pre>
  
  <p>Any help would be appreciated.</p>
  
  <p>user.cpp:</p>
  
  <pre><code>#include "user.h"
  
  using namespace std;
  
  User(int user_id, string user_name, int user_year, int user_zip)
  {
     id = user_id;
     name = user_name;
     year = user_year;
     zip = user_zip;
     friends = {};
  }
  
  ~User()
  {
  
  }
  
  void User::add_friend(int id)
  {
     friends.push_back(id);
  }
  
  void User::delete_friend(int id)
  {
     for (int i = 0; i &lt; friends.size();++i)
     {
        if (friends[i] == id)
        {
           friends.erase(vec.begin() + i);
        }
     }
  }
  
  int User::getID()
  {
     return id;
  }
  
  string User::getName()
  {
     return name;
  }
  
  int User::getYear()
  {
     return year;
  }
  
  int User::getZip()
  {
     return zip;
  }
  
  vector&lt;int&gt;* User::getFriends()
  {
     return &amp;friends;
  }
  </code></pre>
  
  <p>user.h:</p>
  
  <pre><code>#ifndef USER_H
  #define USER_H
  #include &lt;string&gt;
  #include &lt;vector&gt;
  
  class User {
  
   public:
  
      User(int user_id, std::string user_name, int user_year, int user_zip);
      ~User();
      void add_friend(int id);
      void delete_friend(int id);
      int getID();
      std::string getName();
      int getYear();
      int getZip();
      std::vector&lt;int&gt;* getFriends();
  
   private:
  
      int id;
      std::string name;
      int year;
      int zip;
      std::vector&lt;int&gt; friends;
  
  };
  
  #endif
  </code></pre>