/* //例23.3.1 交换结构体数据对象Jack和Mick #include using namespace std; template void Swap(T &a,T &b); struct people { char name[10]; int age; }; void show(people&p); int main() { int i=10,j=20; cout<<"初始值i="< void Swap(T &a,T &b) { T temp; temp=a; a=b; b=temp; } void show(people&p) { cout< using namespace std; template void Swap(T &a,T &b); struct people { char name[10]; int age; }; template<>void Swap(people&p1,people&p2); //void Swap(people&a,people&b); void show(people&p); int main() { int i=10,j=20; cout<<"初始值i="< void Swap(T &a,T &b) { T temp; temp=a; a=b; b=temp; } template<>void Swap(people &a,people &b) //void Swap(people&a,people&b) { int Age; Age=a.age; a.age=b.age; b.age=Age; } void show(people&p) { cout< using namespace std; template void show(T a){cout<(char&); int main() { show(5); return 0; }