Borderou de evaluare (job #1605239)

Utilizator ASTELOTudor Enescu ASTELO Data 18 februarie 2016 21:02:12
Problema Puteri4 Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘int main()’: user.cpp:12:14: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘long long int*’ [-Wformat=] scanf("%d",&t); ^ user.cpp:18:39: error: conversion from ‘std::set<long long int>::iterator {aka std::_Rb_tree_const_iterator<long long int>}’ to non-scalar type ‘std::set<int>::iterator {aka std::_Rb_tree_const_iterator<int>}’ requested set<int>::iterator it=s.find(x); ^ user.cpp:19:14: error: no match for ‘operator==’ (operand types are ‘std::set<int>::iterator {aka std::_Rb_tree_const_iterator<int>}’ and ‘std::set<long long int>::iterator {aka std::_Rb_tree_const_iterator<long long int>}’) if(it==s.end()) ^ user.cpp:19:14: note: candidates are: In file included from /usr/include/c++/4.8/set:60:0, from user.cpp:3: /usr/include/c++/4.8/bits/stl_tree.h:298:7: note: bool std::_Rb_tree_const_iterator<_Tp>::operator==(const _Self&) const [with _Tp = int; std::_Rb_tree_const_iterator<_Tp>::_Self = std::_Rb_tree_const_iterator<int>] operator==(const _Self& __x) const ^ /usr/include/c++/4.8/bits/stl_tree.h:298:7: note: no known conversion for argument 1 from ‘std::set<long long int>::iterator {aka std::_Rb_tree_const_iterator<long long int>}’ to ‘const _Self& {aka const std::_Rb_tree_const_iterator<int>&}’ In file included from /usr/include/c++/4.8/set:62:0, from user.cpp:3: /usr/include/c++/4.8/bits/stl_multiset.h:737:5: note: template<class _Key, class _Compare, class _Alloc> bool std::operator==(const std::multiset<_Key, _Compare, _Alloc>&, const std::multiset<_Key, _Compare, _Alloc>&) operator==(const multiset<_Key, _Compare, _Alloc>& __x, ^ /usr/include/c++/4.8/bits/stl_multiset.h:737:5: note: template argument deduction/substitution failed: user.cpp:19:22: note: ‘std::set<int>::iterator {aka std::_Rb_tree_const_iterator<int>}’ is not derived from ‘const std::multiset<_Key, _Compare, _Alloc>’ if(it==s.end()) ^ In file included from /usr/include/c++/4.8/set:61:0, from user.cpp:3: /usr/include/c++/4.8/bits/stl_set.h:752:5: note: template<class _Key, class _Compare, class _Alloc> bool std::operator==(const std::set<_Key, _Compare, _Alloc>&, const std::set<_Key, _Compare, _Alloc>&) operator==(const set<_Key, _Compare, _Alloc>& __x, ^ /usr/include/c++/4.8/bits/stl_set.h:752:5: note: template argument deduction/substitution failed: user.cpp:19:22: note: ‘std::set<int>::iterator {aka std::_Rb_tree_const_iterator<int>}’ is not derived from ‘const std::set<_Key, _Compare, _Alloc>’ if(it==s.end()) ^ In file included from /usr/include/c++/4.8/set:60:0, from user.cpp:3: /usr/include/c++/4.8/bits/stl_tree.h:904:5: note: template<class _Key, class _Val, class _KeyOfValue, class _Compare, class _Alloc> bool std::operator==(const std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&, const std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&) operator==(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, ^ /usr/include/c++/4.8/bits/stl_tree.h:904:5: note: template argument deduction/substitution failed: user.cpp:19:22: note: ‘std::set<int>::iterator {aka std::_Rb_tree_const_iterator<int>}’ is not derived from ‘const std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>’ if(it==s.end()) ^ In file included from /usr/include/c++/4.8/set:60:0, from user.cpp:3: /usr/include/c++/4.8/bits/stl_tree.h:310:5: note: template<class _Val> bool std::operator==(const std::_Rb_tree_iterator<_Tp>&, const std::_Rb_tree_const_iterator<_Val>&) operator==(const _Rb_tree_iterator<_Val>& __x, ^ /usr/include/c++/4.8/bits/stl_tree.h:310:5: note: template argument deduction/substitution failed:

Ceva nu functioneaza?