下面是我的頭文件trie.h的代碼。 編譯器不斷顯示以下錯誤:重新定義結構
In file included from speller.c:11:
./trie.h:3:8: error: redefinition of 'letter'
struct letter
^
./trie.h:3:8: note: previous definition is here
struct letter
^
1 error generated.
make: *** [speller.o] Error 1
代碼:
struct letter
{
int is_word;
struct letter* arr[27];
};
// fuctions
struct letter* create_trie();
void free_trie(struct letter* trie);
您的標題包含警衛嗎? – DeiDei