keil中error: #70: incomplete type is not allowed—解决方法

今天在写程序的时候,想使用sizeof求数组的大小,数组中其他c文件定义,在头文件使用extern uint8_t buff_value[]; 声明

但是keil编译报错,网上查了,发现,需要写成extern uint8_t buff_value[30];把数组的大小固定了,才能编译通过。

原文地址:https://www.cnblogs.com/CodeWorkerLiMing/p/12007292.html