class person { public: char _name[50]; }; void Sort(person &a, person &b) { if (a._name > b._name) { person temp = a; a = b; b = temp; } } template void Sort(T &a, T &b) { if (a > b) { T temp = a; a = b; b = temp; } } template<> void Sort(int &a, int &b) { if (a > b) { int temp = a; a = b; b = temp; } } template<> void Sort(double &a, double &b) { if (a > b) { double temp = a; a = b; b = temp; } } template<> void Sort(float &a, float &b) { if (a > b) { float temp = a; a = b; b = temp; } } template<> void Sort(person &a, person &b)int main() { int a = 100; int b = 50; Sort(a, b); double c = 5.5; double d = 3.9870000000000001; Sort(c, d); float e = 4.4000000000000004; float f = 2.2200000000000002; Sort(e, f); person g, h; Sort(g, h); return 0; }