본문 바로가기

C++문법

sort

[벡터의 경우]

vector<int> v;

sort(v.begin(), v.end());

 

[배열의 경우]

int arr[10];

sort(a, a+10);