把 return cur;放到 while {} 之外
int arr[3] = {1,2,3}; int*p = arr; for(;p!=arr+3;p++){ printf("%d\n",*p); } return 0; }