728x90
반응형
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
void main()
{
int ari[]={2,8,5,1,9};
vector<int> vi(&ari[0],&ari[5]);
sort(vi.begin(),vi.end());
vector<int>::iterator it;
for (it=vi.begin();it!=vi.end();it++) {
printf("%d\n",*it);
}
}
728x90
반응형
'프로그래밍 기록 > stl' 카테고리의 다른 글
shuffle (0) | 2023.12.09 |
---|---|
reverse (0) | 2023.12.09 |
find (0) | 2023.12.09 |
itergeneric (0) | 2023.12.09 |
itervector (0) | 2023.12.08 |
댓글