Borderou de evaluare (job #1279849)

Utilizator diana-t95FMI Tudoreanu Diana Elena diana-t95 Data 30 noiembrie 2014 23:22:23
Problema Hashuri Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:5:19: error: wrong number of template arguments (1, should be 5) unordered_map <int> mymap; ^ In file included from /usr/include/c++/4.8/unordered_map:48:0, from user.cpp:3: /usr/include/c++/4.8/bits/unordered_map.h:97:11: error: provided for ‘template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> class std::unordered_map’ class unordered_map : __check_copy_constructible<_Alloc> ^ user.cpp:5:26: error: invalid type in declaration before ‘;’ token unordered_map <int> mymap; ^ user.cpp: In function ‘int main()’: user.cpp:15:26: error: request for member ‘insert’ in ‘mymap’, which is of non-class type ‘int’ if (op==1) mymap.insert(x); ^ user.cpp:16:26: error: request for member ‘erase’ in ‘mymap’, which is of non-class type ‘int’ if (op==2) mymap.erase(x); ^ user.cpp:17:30: error: request for member ‘find’ in ‘mymap’, which is of non-class type ‘int’ if (op==3) if (mymap.find(x)!=mymap.end()) g<<"1\n"; else g<<"0\n"; ^ user.cpp:17:45: error: request for member ‘end’ in ‘mymap’, which is of non-class type ‘int’ if (op==3) if (mymap.find(x)!=mymap.end()) g<<"1\n"; else g<<"0\n"; ^ user.cpp:17:12: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wparentheses] if (op==3) if (mymap.find(x)!=mymap.end()) g<<"1\n"; else g<<"0\n"; ^

Ceva nu functioneaza?