close
利用sort algorithm寫一個排序範例.....
#include <vector>
#include <algorithm> // Include algorithms
using namespace std;
vector<int> vec;
vec.push_back (10);
vec.push_back (3);
vec.push_back (7);
sort(vec.begin(), vec.end()); // Sort the vector
// The vector now contains: 3, 7, 10
全站熱搜
留言列表