Borderou de evaluare (job #1521849)
Utilizator | Data | 10 noiembrie 2015 21:37:37 | |
---|---|---|---|
Problema | Dragoni | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:11:42: error: ‘int time’ redeclared as different kind of symbol
int nrNodes, nrEdges, cod, node1, node2, time, maxim;
^
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/basic_string.h:39,
from /usr/include/c++/4.8/string:52,
from /usr/include/c++/4.8/random:41,
from /usr/include/c++/4.8/bits/stl_algo.h:65,
from /usr/include/c++/4.8/algorithm:62,
from user.cpp:2:
/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 ‘int main()’:
user.cpp:46:49: warning: format ‘%d’ expects argument of type ‘int*’, but argument 4 has type ‘time_t (*)(time_t*)throw () {aka long int (*)(long int*)throw ()}’ [-Wformat=]
scanf ("%d %d %d", &node1, &node2, &time);
^
user.cpp:48:54: error: no matching function for call to ‘std::vector<std::pair<int, int> >::push_back(std::pair<int, long int (*)(long int*)throw ()>)’
Edges[node1].push_back(make_pair(node2, time));
^
user.cpp:48:54: note: candidates are:
In file included from /usr/include/c++/4.8/vector:64:0,
from /usr/include/c++/4.8/bits/random.h:34,
from /usr/include/c++/4.8/random:50,
from /usr/include/c++/4.8/bits/stl_algo.h:65,
from /usr/include/c++/4.8/algorithm:62,
from user.cpp:2:
/usr/include/c++/4.8/bits/stl_vector.h:901:7: note: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>]
push_back(const value_type& __x)
^
/usr/include/c++/4.8/bits/stl_vector.h:901: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_vector.h:919:7: note: void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>]
push_back(value_type&& __x)
^
/usr/include/c++/4.8/bits/stl_vector.h:919:7: note: no known conversion for argument 1 from ‘std::pair<int, long int (*)(long int*)throw ()>’ to ‘std::vector<std::pair<int, int> >::value_type&& {aka std::pair<int, int>&&}’
user.cpp:49:54: error: no matching function for call to ‘std::vector<std::pair<int, int> >::push_back(std::pair<int, long int (*)(long int*)throw ()>)’
Edges[node2].push_back(make_pair(node1, time));
^
user.cpp:49:54: note: candidates are:
In file included from /usr/include/c++/4.8/vector:64:0,
from /usr/include/c++/4.8/bits/random.h:34,
from /usr/include/c++/4.8/random:50,
from /usr/include/c++/4.8/bits/stl_algo.h:65,
from /usr/include/c++/4.8/algorithm:62,
from user.cpp:2:
/usr/include/c++/4.8/bits/stl_vector.h:901:7: note: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>]
push_back(const value_type& __x)
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !