为了让排序功能模板部分能够具有通用性,即不局限于数组还是对象,因此使用了回调函数:
#include <iostream>
#include <stdlib.h>
#include <string>
using namespace std;
class Student
{
public:
Student(string name,int age):mName(name),mAge(age){}
Student(){}
~Student(){}
public:
string mName;
in