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
arrow
arrow
    全站熱搜

    NBPBlog 發表在 痞客邦 留言(0) 人氣()