#include <algorithm> 後
- 利用sort就可以了
vector <int> temp; temp.push_back(2); temp.push_back(4); temp.push_back(6); sort(temp.begin(),temp.end());
結果就是由小排到大
Continue reading “[C++] Vector Sort”
Advertisements
Strive to be lazy
#include <algorithm> 後
vector <int> temp; temp.push_back(2); temp.push_back(4); temp.push_back(6); sort(temp.begin(),temp.end());
結果就是由小排到大
Continue reading “[C++] Vector Sort”