title: <algorithm> vector sort with objects?
body: <p>So, in the c++ documentation in the  header there is a nice function that lets you sort vectors. I have a class <code>Person</code>. I have a vector of pointers to objects of that class (<code>vector&lt;Person*&gt;</code>) and I want to compare the people by different parameters, for example age, length of name and so on. </p>
  
  <p>I already have functions which return the needed variables but I am not sure how to do that. Here is a link to the sort vector function in the c++ reference <a href="http://www.cplusplus.com/reference/algorithm/sort/" rel="nofollow">http://www.cplusplus.com/reference/algorithm/sort/</a> </p>