Borderou de evaluare (job #1462971)
Utilizator | Data | 19 iulie 2015 15:33:14 | |
---|---|---|---|
Problema | Trie | Status | done |
Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘void pushToTrie(Trie*, int, std::string&)’:
user.cpp:44:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (letter == str.size()) { // finished the current word
^
user.cpp:53:58: error: too few arguments to function ‘void pushToTrie(Trie*, int, std::string&)’
pushToTrie(node->child[str[letter] - 'a'], letter + 1); // continue with the next character from word
^
user.cpp:43:6: note: declared here
void pushToTrie(Trie* node, int letter, string& str) {
^
user.cpp: In function ‘bool popFromTrie(Trie*, int, std::string&)’:
user.cpp:57:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (letter == str.size()) { // finished the current word
^
user.cpp:60:67: error: too few arguments to function ‘bool popFromTrie(Trie*, int, std::string&)’
if (popFromTrie(node->child[str[letter] - 'a'], letter + 1) == true) { // if I eliminated the child
^
user.cpp:56:6: note: declared here
bool popFromTrie(Trie* node, int letter, string& str) {
^
user.cpp: In function ‘int getNumberOfWords(Trie*, int, std::string&)’:
user.cpp:79:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (letter == str.size()) // we have reached the end of the word
^
user.cpp:86:39: error: too few arguments to function ‘int getNumberOfWords(Trie*, int, std::string&)’
letter + 1); // continue with the next letter
^
user.cpp:78:5: note: declared here
int getNumberOfWords(Trie* node, int letter, string& str) {
^
user.cpp: In function ‘int getLengthOfPrefix(Trie*, int, std::string&)’:
user.cpp:90:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (letter == str.size() || node->child[str[letter] - 'a'] == NULL) // if I've finished the current word or
^
user.cpp:94:74: error: ‘getNumberOfPrefixes’ was not declared in this scope
return getNumberOfPrefixes(node->child[str[letter] - 'a'], letter + 1); // otherwise go to the child with the next character
^
user.cpp: In function ‘int getNumberOfWords(Trie*, int, std::string&)’:
user.cpp:87:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
user.cpp: In function ‘int getLengthOfPrefix(Trie*, int, std::string&)’:
user.cpp:95:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !