Borderou de evaluare (job #2261583)
Utilizator | Data | 16 octombrie 2018 13:29:23 | |
---|---|---|---|
Problema | Trie | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'void adauga(Trie*, char*)':
main.cpp:2:13: error: invalid operands of types 'char*' and 'char*' to binary 'operator*'
#define ch s*s-'a'
~^~
main.cpp:30:13: note: in expansion of macro 'ch'
if(p->fii[ch]==NULL)
^~
main.cpp:2:13: error: invalid operands of types 'char*' and 'char*' to binary 'operator*'
#define ch s*s-'a'
~^~
main.cpp:32:11: note: in expansion of macro 'ch'
p->fii[ch]=new Trie();
^~
main.cpp:2:13: error: invalid operands of types 'char*' and 'char*' to binary 'operator*'
#define ch s*s-'a'
~^~
main.cpp:34:17: note: in expansion of macro 'ch'
adauga(p->fii[ch],s+1);
^~
main.cpp: In function 'void elimina(Trie*, char*)':
main.cpp:2:13: error: invalid operands of types 'char*' and 'char*' to binary 'operator*'
#define ch s*s-'a'
~^~
main.cpp:47:18: note: in expansion of macro 'ch'
elimina(p->fii[ch],s+1);
^~
main.cpp: In function 'int calculeaza(Trie*, char*)':
main.cpp:54:4: error: no match for 'operator<<' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'short int')
f<<p->rasp<<"\n";
~^~~~~~~~~
main.cpp:54:4: note: candidate: operator<<(int, int) <built-in>
main.cpp:54:4: note: no known conversion for argument 1 from 'std::ifstream {aka std::basic_ifstream<char>}' to 'int'
In file included from /usr/include/c++/6/string:52:0,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
from main.cpp:1:
/usr/include/c++/6/bits/basic_string.h:5340:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
operator<<(basic_ostream<_CharT, _Traits>& __os,
^~~~~~~~
/usr/include/c++/6/bits/basic_string.h:5340:5: note: template argument deduction/substitution failed:
main.cpp:54:9: note: 'std::ifstream {aka std::basic_ifstream<char>}' is not derived from 'std::basic_ostream<_CharT, _Traits>'
f<<p->rasp<<"\n";
^~~~
In file included from /usr/include/c++/6/bits/ios_base.h:46:0,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/istream:38,
from /usr/include/c++/6/fstream:38,
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !