The prototype:
void PrintVec2(float *a, int n)
Does not match the input parameter:
PrintVec2(Cities,N*Nv);
The function prototype is looking for the address of the array. Change it to send &Cities[0][0]
:
PrintVec2(&Cities[0][0],N*Nv);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…