更新时间:2022-11-20 22:51:32
while(k1==-1 || k2==-1){ // loop of i to generate (Num_Depot-1)
然后,您可以将这些值用作某个数组的索引.数组的索引从0到(正)N;任何负索引都将尝试寻址不属于该数组的内存,因此会引起问题.
You then use these values as indices into some array. Arrays are indexed from 0 to (positive)N; any negative index will try to address memory that does not belong to the array and will therefore cause problems.