title: "non-standard syntax; use '&' to create a pointer to member" error in Visual Studio 2015
body: <p>I have this function:</p>
  <pre><code>std::string Room::getUsersAsString(std::vector&lt;User*&gt; usersList, User * excludeUser)
  {
      std::string usersNames = &quot; &quot;;
  
      for (int i = 0; i &lt; usersList.size(); i++) {
          if (usersList[i]-&gt;getUsername() != excludeUser-&gt;getUsername) {
              usersNames.append(usersList[i]-&gt;getUsername);
              usersNames.append(&quot; &quot;);
          }
      }
  
      return usersNames;
  }
  </code></pre>
  <p>Whenever I try to run the program, I get the following error:</p>
  <blockquote>
  <p>non-standard syntax; use '&amp;' to create a pointer to member</p>
  </blockquote>
  <p>How can I fix it?</p>