int數組我剛學C,和我有一個函數分配數組全局定義的數組問題:不兼容的類型在C
// So I have my multi-dim global array
uint16_t pulseSets[1][50][2];
void foo()
{
//create another array to work with in here
uint16_t pulses[50][2];
// Do some stuff with pulses here
// ...
// and now assign it to my global array
pulseSets[0] = pulses;
}
編譯時出現錯誤:
incompatible types when assigning to type ‘uint16_t[50][2]’ from type ‘uint16_t (*)[2]’
pulseSets[0] = pulses; ^
這兩個數組都是相同的類型和大小,所以爲什麼這會打破?