你想干什么
double lowest(size_t n)
{
double* pMark = new double[n];
double min = -1;
for (int i = 0; i < n; i++)
{
cin >> pMark[i];// or cin>>*(pMark+i);
if (i == 0)
min = *pMark;
min = pMark[i] < min ? pMark[i] : min;
}
delete[] pMark;
pMark = NULL;
return min;
}
int main()
{
cout<<lowest(4);
return 0;
}
[此贴子已经被作者于2017-4-12 17:58编辑过]