Borderou de evaluare (job #1470690)
Utilizator | Data | 11 august 2015 21:45:33 | |
---|---|---|---|
Problema | Arbore3 | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘void Read()’:
user.cpp:13:25: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘long int*’ [-Wformat=]
scanf("%d%d",&N,&Sum);
^
user.cpp:13:25: warning: format ‘%d’ expects argument of type ‘int*’, but argument 3 has type ‘long int*’ [-Wformat=]
user.cpp:16:22: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘long int*’ [-Wformat=]
scanf("%d",&x);
^
user.cpp:18:28: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘long int*’ [-Wformat=]
scanf("%d",&cost[i]);
^
user.cpp: In function ‘int Search(int)’:
user.cpp:26:50: error: conversion from ‘std::vector<long int>::iterator {aka __gnu_cxx::__normal_iterator<long int*, std::vector<long int> >}’ to non-scalar type ‘std::vector<int>::iterator {aka __gnu_cxx::__normal_iterator<int*, std::vector<int> >}’ requested
for(vector<int>::iterator it=Hash[key].begin();it!=Hash[key].end();it++)
^
user.cpp:26:54: error: no match for ‘operator!=’ (operand types are ‘std::vector<int>::iterator {aka __gnu_cxx::__normal_iterator<int*, std::vector<int> >}’ and ‘std::vector<long int>::iterator {aka __gnu_cxx::__normal_iterator<long int*, std::vector<long int> >}’)
for(vector<int>::iterator it=Hash[key].begin();it!=Hash[key].end();it++)
^
user.cpp:26:54: note: candidates are:
In file included from /usr/include/c++/4.8/iosfwd:40:0,
from /usr/include/c++/4.8/ios:38,
from /usr/include/c++/4.8/ostream:38,
from /usr/include/c++/4.8/iostream:39,
from user.cpp:1:
/usr/include/c++/4.8/bits/postypes.h:221:5: note: template<class _StateT> bool std::operator!=(const std::fpos<_StateT>&, const std::fpos<_StateT>&)
operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
^
/usr/include/c++/4.8/bits/postypes.h:221:5: note: template argument deduction/substitution failed:
user.cpp:26:70: note: ‘std::vector<int>::iterator {aka __gnu_cxx::__normal_iterator<int*, std::vector<int> >}’ is not derived from ‘const std::fpos<_StateT>’
for(vector<int>::iterator it=Hash[key].begin();it!=Hash[key].end();it++)
^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:64:0,
from /usr/include/c++/4.8/bits/char_traits.h:39,
from /usr/include/c++/4.8/ios:40,
from /usr/include/c++/4.8/ostream:38,
from /usr/include/c++/4.8/iostream:39,
from user.cpp:1:
/usr/include/c++/4.8/bits/stl_pair.h:227:5: note: template<class _T1, class _T2> constexpr bool std::operator!=(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
^
/usr/include/c++/4.8/bits/stl_pair.h:227:5: note: template argument deduction/substitution failed:
user.cpp:26:70: note: ‘std::vector<int>::iterator {aka __gnu_cxx::__normal_iterator<int*, std::vector<int> >}’ is not derived from ‘const std::pair<_T1, _T2>’
for(vector<int>::iterator it=Hash[key].begin();it!=Hash[key].end();it++)
^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
from /usr/include/c++/4.8/bits/char_traits.h:39,
from /usr/include/c++/4.8/ios:40,
from /usr/include/c++/4.8/ostream:38,
from /usr/include/c++/4.8/iostream:39,
from user.cpp:1:
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !