可以帮我看看这个程序吗?
这个程序要求找到第K个大的元素
#include"iostream" using namespace std void Find_Kth_Largest(int list[],int n,int k){ //list:the value to look through //n:the size of the list //k:the element to select int i,largest,largest_location,j; for(i=1;i<=k;i++){//for_1 largest=list[1]; largest_location=1; for(j=2;j<=N-(i-1);j++){//for_2 if(list[j]>largest){ largest=list[j]; largest_location=j; }//if }//for_2 swap(list[n-(i-1)],list[largest_location]);//exchanging, making the largest elements //in the last elements of the list }//for_1 cout<<"The number is:"; <<largest; }//Find_Kth_Largest void swap(int &a,int &b){//exchange int temp; temp=a; a=b; b=temp; }//swap void main(){ int List[16],K; cout<<"Please input the K"; cin<<K; List[0]=1; for(i=1;i<=15;i++){ List[i]=2*i-1; List[0]++; }//for Find_Kth_Largest(List,List[0],K); }
程序出错时,那些提示信息到底是怎么看啊?