c++ swap函数

swap(a,b)也就是把a和b的值互换。

头文件:#include<algorithm>,swap要加using namespace std;

原文地址:https://www.cnblogs.com/lipeiyi520/p/8430683.html