알고리즘의 정책 변경
알고리즘의 정책 변경 1. 함수, 함수 객체, 람다 표현식 #include #include #include #include // STL의 함수 객체 사용 using namespace std; bool compare( int a, int b) ( retrun a > b; } int main(){vector v = {1,2,3,4,5,6,7,8,9,10}; sort(v.begin(), v.end()); // 크기비교 < for (auto n : v)cout