C++中sort()函數的使用方法

sort()是C++給的一種排序函數,頭文件爲 #include <algorithm> ios 語法描述:sort(begin,end,cmp),cmp參數能夠沒有,若是沒有默認非降序排序。函數 下面給個實例:spa #include <iostream> #include <algorithm> using namespace std; int main() { int a[] =
相關文章
相關標籤/搜索