//test #include <algorithm> using namespace std; int main(){ int a[10]; sort(a,a+10,[](int x,int y){return x<y;}); }
上面的代码编译不过
有报错[Error] no matching function for call to 'sort(int [10], int*, main()::<lambda(int, int)>)'
[Error] no matching function for call to 'sort(int [10], int*, main()::<lambda(int, int)>)'
不太懂是怎么回事,希望有大佬解答一下怎样是对的