Borderou de evaluare (job #2062849)

Utilizator satzaFoldesi Richard satza Data 10 noiembrie 2017 21:33:59
Problema Componente tare conexe Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:10:17: error: ‘int time’ redeclared as different kind of symbol int n, m, x, y, time, nr; ^ In file included from /usr/include/pthread.h:26:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/gthr-default.h:35, from /usr/include/i386-linux-gnu/c++/4.8/bits/gthr.h:148, from /usr/include/c++/4.8/ext/atomicity.h:33, from /usr/include/c++/4.8/bits/ios_base.h:39, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from user.cpp:1: /usr/include/time.h:186:15: error: previous declaration of ‘time_t time(time_t*)’ extern time_t time (time_t *__timer) __THROW; ^ user.cpp: In function ‘void dfs(int)’: user.cpp:20:33: warning: pointer to a function used in arithmetic [-Wpointer-arith] color[k] = 2; time = time + 1; ^ user.cpp:20:24: error: assignment of function ‘time_t time(time_t*)’ color[k] = 2; time = time + 1; ^ user.cpp:20:24: error: cannot convert ‘time_t (*)(time_t*)throw () {aka long int (*)(long int*)throw ()}’ to ‘time_t(time_t*)throw () {aka long int(long int*)throw ()}’ in assignment user.cpp:21:30: error: no matching function for call to ‘std::stack<std::pair<int, int> >::push(std::pair<int, long int (*)(long int*)throw ()>)’ st.push(make_pair(k,time)); ^ user.cpp:21:30: note: candidates are: In file included from /usr/include/c++/4.8/stack:61:0, from user.cpp:4: /usr/include/c++/4.8/bits/stl_stack.h:186:7: note: void std::stack<_Tp, _Sequence>::push(const value_type&) [with _Tp = std::pair<int, int>; _Sequence = std::deque<std::pair<int, int>, std::allocator<std::pair<int, int> > >; std::stack<_Tp, _Sequence>::value_type = std::pair<int, int>] push(const value_type& __x) ^ /usr/include/c++/4.8/bits/stl_stack.h:186:7: note: no known conversion for argument 1 from ‘std::pair<int, long int (*)(long int*)throw ()>’ to ‘const value_type& {aka const std::pair<int, int>&}’ /usr/include/c++/4.8/bits/stl_stack.h:191:7: note: void std::stack<_Tp, _Sequence>::push(std::stack<_Tp, _Sequence>::value_type&&) [with _Tp = std::pair<int, int>; _Sequence = std::deque<std::pair<int, int>, std::allocator<std::pair<int, int> > >; std::stack<_Tp, _Sequence>::value_type = std::pair<int, int>] push(value_type&& __x) ^ /usr/include/c++/4.8/bits/stl_stack.h:191:7: note: no known conversion for argument 1 from ‘std::pair<int, long int (*)(long int*)throw ()>’ to ‘std::stack<std::pair<int, int> >::value_type&& {aka std::pair<int, int>&&}’

Ceva nu functioneaza?