c语言 - "expected '=', ',', ';', 'asm' or '__attribute__' before 'char'"是什么意思?AVR


// Sting for the Name
extern const PROGMEM char name[];
//Data structure of the Heap
typedef struct
{
  AllocStrategies strategy;
  uint16_t size;
  MemAddr start;
  MemDriver* driver;
  const PROGMEM char name[];
}Heap;

预期'=',',',';',','','','__属性__'''

为什么我两次收到此错误消息?

您忘记包括一个文件:

#include <avr/pgmspace.h>

允许您在程序空间中分配const变量的PROGMEM属性。

您正在两次收到此错误消息,因为您两次使用PROGMEM

最新更新