急!关于排序的问题!
我定义了这样一个类
class Student
{
public:
Student();
Student(const string& name, const int age);
Student(const Student& rhs);
~Student();
void SetName(const string& name);
string GetName() const;
void SetAge(const int age);
int GetAge() const;
Student& operator=(const Student& rhs);
private:
string itsName;
int itsAge;
};
我想把这个student类的对象放进vector里!请问怎么样可以安itsAge从小到大排列?还有求出itsAge的平均值