VC6.0中,‘’for(p=arrary+1;p<arrary_end;p++)‘’编译通不过?
帮忙看看问题所在,代码如下:程序代码:
int max,min; void max_min_value(int arrary[],int n) { int *p,*arrary_end; arrary_end=arrary+n; max=min=*arrary; for(p=arrary+1;p<arrary_end;p++) { if(*p>max)max=*p; else if(*P<min)min=*p; } return 0; } int main() { int number[10],i; printf("input 10 numbers:\n"); for(i=0;i<10;i++) scanf("%d",&number[i]); max_min_value(number,10); printf("max=%d,min=%d\n",max,min); return 0; }