0_0_22258042_29433.cpp: In constructor 'Trie::Trie()':
0_0_22258042_29433.cpp:10:14: error: 'NULL' was not declared in this scope
next[i] = NULL;
^
0_0_22258042_29433.cpp: In function 'void Insert(char*)':
0_0_22258042_29433.cpp:23:33: error: 'NULL' was not declared in this scope
if (p->next[word[i] - 'a'] == NULL) //如果该字符没有对应的节点
^
0_0_22258042_29433.cpp: In function 'int Find(char*)':
0_0_22258042_29433.cpp:35:33: error: 'NULL' was not declared in this scope
if (p->next[word[i] - 'a'] == NULL)
^
0_0_22258042_29433.cpp: In function 'int main()':
0_0_22258042_29433.cpp:45:9: error: 'cin' was not declared in this scope
while (cin.getline(word, 12))
^
0_0_22258042_29433.cpp:47:18: error: 'strlen' was not declared in this scope
if (strlen(word) == 0 || word[0] == ' ') //如果读入字符串的长度为0或者是空格,说明读入的是空行
^
0_0_22258042_29433.cpp:51:25: error: 'scanf' was not declared in this scope
while (scanf("%s", word) != EOF)
^
0_0_22258042_29433.cpp:51:30: error: 'EOF' was not declared in this scope
while (scanf("%s", word) != EOF)
^
0_0_22258042_29433.cpp:53:28: error: 'printf' was not declared in this scope
printf("%d\n", Find(word)); //返回word为前缀的单词的数量
^
|