哦,我宿舍熄灯了,明天吧
程序代码:
/*
Name: stl之sort用法参考
Copyright:
Author: 随心
Date: 20-10-08 00:58
Description:
*/
#include <iostream>
#include <cstdlib>
int main()
{
int a[5] = {2, 1, 4, 3, 0};
std::sort(a, a+sizeof(a)/sizeof(int));
for (int i=0; i<5; i++)
{
std::cout << a[i] << std::ends;
}
system("pause");
return 0;
}
