Borderou de evaluare (job #1218824)
Utilizator | Data | 12 august 2014 17:08:33 | |
---|---|---|---|
Problema | Secventa 5 | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘long long unsigned int count(int, int)’:
user.cpp:16:5: error: reference to ‘hash’ is ambiguous
hash s;
^
user.cpp:12:52: note: candidates are: typedef class std::tr1::unordered_map<unsigned int, int> hash
typedef std::tr1::unordered_map<unsigned int, int> hash;
^
In file included from /usr/include/c++/4.8/bits/basic_string.h:3033:0,
from /usr/include/c++/4.8/string:52,
from /usr/include/c++/4.8/bits/locale_classes.h:40,
from /usr/include/c++/4.8/bits/ios_base.h:41,
from /usr/include/c++/4.8/ios:42,
from /usr/include/c++/4.8/istream:38,
from /usr/include/c++/4.8/fstream:38,
from user.cpp:1:
/usr/include/c++/4.8/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^
user.cpp:16:10: error: expected ‘;’ before ‘s’
hash s;
^
user.cpp:21:9: error: ‘s’ was not declared in this scope
s[v[right]]++;
^
user.cpp:25:13: error: reference to ‘hash’ is ambiguous
hash::iterator it = s.find(v[left++]);
^
user.cpp:12:52: note: candidates are: typedef class std::tr1::unordered_map<unsigned int, int> hash
typedef std::tr1::unordered_map<unsigned int, int> hash;
^
In file included from /usr/include/c++/4.8/bits/basic_string.h:3033:0,
from /usr/include/c++/4.8/string:52,
from /usr/include/c++/4.8/bits/locale_classes.h:40,
from /usr/include/c++/4.8/bits/ios_base.h:41,
from /usr/include/c++/4.8/ios:42,
from /usr/include/c++/4.8/istream:38,
from /usr/include/c++/4.8/fstream:38,
from user.cpp:1:
/usr/include/c++/4.8/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^
user.cpp:25:13: error: reference to ‘hash’ is ambiguous
hash::iterator it = s.find(v[left++]);
^
user.cpp:12:52: note: candidates are: typedef class std::tr1::unordered_map<unsigned int, int> hash
typedef std::tr1::unordered_map<unsigned int, int> hash;
^
In file included from /usr/include/c++/4.8/bits/basic_string.h:3033:0,
from /usr/include/c++/4.8/string:52,
from /usr/include/c++/4.8/bits/locale_classes.h:40,
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !