关于引用
#include <iostream.h>void findmax(int*a,int &n,int i,int &pk);
int main()
{
const size=10;
.......
findmax(a,size,0,n);
cout <<"the maximum is"<<a[n]<<endl
<<"It's index is"<<n<<endl;
}
为什么显示error C2664: 'findmax' : cannot convert parameter 2 from 'const int' to 'int &'
Conversion loses qualifiers