Borderou de evaluare (job #2146173)
Utilizator | Data | 27 februarie 2018 20:43:52 | |
---|---|---|---|
Problema | Project management | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:9:58: error: ‘int time’ redeclared as different kind of symbol
int n, t[102], T[102], grad[102], grad2[102], sol2[102], time;
^
In file included from /usr/include/pthread.h:24:0,
from /usr/include/x86_64-linux-gnu/c++/5/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/5/bits/gthr.h:148,
from /usr/include/c++/5/ext/atomicity.h:35,
from /usr/include/c++/5/bits/ios_base.h:39,
from /usr/include/c++/5/ios:42,
from /usr/include/c++/5/istream:38,
from /usr/include/c++/5/fstream:38,
from user.cpp:1:
/usr/include/time.h:192:15: note: previous declaration ‘time_t time(time_t*)’
extern time_t time (time_t *__timer) __THROW;
^
user.cpp: In function ‘int main()’:
user.cpp:51:46: error: no matching function for call to ‘max(time_t (&)(time_t*) throw (), int&)’
time = max(time, t[i] += T[i]);
^
In file included from /usr/include/c++/5/bits/char_traits.h:39:0,
from /usr/include/c++/5/ios:40,
from /usr/include/c++/5/istream:38,
from /usr/include/c++/5/fstream:38,
from user.cpp:1:
/usr/include/c++/5/bits/stl_algobase.h:219:5: note: candidate: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)
max(const _Tp& __a, const _Tp& __b)
^
/usr/include/c++/5/bits/stl_algobase.h:219:5: note: template argument deduction/substitution failed:
user.cpp:51:46: note: deduced conflicting types for parameter ‘const _Tp’ (‘long int(long int*) throw ()’ and ‘int’)
time = max(time, t[i] += T[i]);
^
In file included from /usr/include/c++/5/bits/char_traits.h:39:0,
from /usr/include/c++/5/ios:40,
from /usr/include/c++/5/istream:38,
from /usr/include/c++/5/fstream:38,
from user.cpp:1:
/usr/include/c++/5/bits/stl_algobase.h:265:5: note: candidate: template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
/usr/include/c++/5/bits/stl_algobase.h:265:5: note: template argument deduction/substitution failed:
user.cpp:51:46: note: deduced conflicting types for parameter ‘const _Tp’ (‘long int(long int*) throw ()’ and ‘int’)
time = max(time, t[i] += T[i]);
^
user.cpp:52:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int j = 0; j < adj[i].size(); j++)
^
user.cpp:64:41: warning: pointer to a function used in arithmetic [-Wpointer-arith]
sol2[i] = T[i] + (time - t[i]);
^
user.cpp:64:42: warning: pointer to a function used in arithmetic [-Wpointer-arith]
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !