DEV-C++ 显示return出来问题
具体为:
[Error] named return values are no longer supported
#include <bits/stdc++.h>
using namespace std;
int n,k;
bool cmp(int x,int y) return x < y;
int main(){
int a[n] = {};
cin >> n,k;
for(int i = 0;i < n;i++){
cin >> a[i];
}
sort(a+0,a+n,cmp);
cout << a[k];
return 0;
}