程式定義如下
#define LEN
struct aa{
uint8_t len;
uint8_t dat[LEN];
};
struct bb{
uint8_t head;
struct aa d[LEN];
};
編譯時錯誤提示:error: #1057: type containing an unknown-size array is not allowed
這種資料定義在IAR下C11是可以編譯的,在keil的C99編譯不過去
uj5u.com熱心網友回復:
#define LEN你的define沒有指定長度呢?
比如:
#define LEN 10
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/108711.html
標籤:C語言
