Zikun Xu
2011-06-13 05:27:35 UTC
struct TrieNode {
enum { Apostrophe = 26, NumChars = 27 };
bool isWord;
TrieNode *letters[NumChars];
TrieNode() {
isWord = false;
for ( int i = 0; i < NumChars; i += 1 ) {
letters[i] = NULL;
} // for
}
}; // TrieNode
enum { Apostrophe = 26, NumChars = 27 };
I do not understand how this works, which is the local parameter?
shouldn't we declare a local variable by
enum { Apostrophe = 26, NumChars = 27 } special_char;
enum { Apostrophe = 26, NumChars = 27 };
bool isWord;
TrieNode *letters[NumChars];
TrieNode() {
isWord = false;
for ( int i = 0; i < NumChars; i += 1 ) {
letters[i] = NULL;
} // for
}
}; // TrieNode
enum { Apostrophe = 26, NumChars = 27 };
I do not understand how this works, which is the local parameter?
shouldn't we declare a local variable by
enum { Apostrophe = 26, NumChars = 27 } special_char;