2017-11-25 135 views
0
// 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; 

預計 '=', '', '', '焦'「char」之前的「expected」=',',',';','asm'或'__attribute__'是什麼意思? AVR

之前 'ASM' 或 '__ attribute__' 爲什麼我會收到此錯誤消息兩次?

+0

因爲'PROGMEM'是什麼? – StoryTeller

+0

因爲你錯過了一個包括...(Arduino?) –

+0

「*預期bla之前'char'*」意味着你放置了不同的東西然後「* bla之前'char'*」。所以你想檢查'*'之前的'*',以及它與* * * *有什麼不同。 – alk

回答

4

你忘了包括一個文件:

#include <avr/pgmspace.h> 

PROGMEM屬性,可以讓你在分配程序的空間const變量定義在那裏。

由於您使用了兩次PROGMEM兩次,因此您收到兩次此錯誤消息。

相關問題