Borderou de evaluare (job #2124615)
Utilizator | Data | 7 februarie 2018 13:42:36 | |
---|---|---|---|
Problema | Heapuri | Status | done |
Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:11:13: error: ‘std::vector<int> time’ redeclared as different kind of symbol
vector<int> time;
^
In file included from /usr/include/pthread.h:24:0,
from /usr/include/x86_64-linux-gnu/c++/5/32/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/5/32/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 ‘void swap(int, int)’:
user.cpp:18:27: warning: pointer to a function used in arithmetic [-Wpointer-arith]
aux = time[heap[poz1].poz];
^
user.cpp:18:27: error: invalid conversion from ‘time_t (*)(time_t*) throw () {aka long int (*)(long int*) throw ()}’ to ‘int’ [-fpermissive]
user.cpp:19:21: warning: pointer to a function used in arithmetic [-Wpointer-arith]
time[heap[poz1].poz] = time[heap[poz2].poz];
^
user.cpp:19:44: warning: pointer to a function used in arithmetic [-Wpointer-arith]
time[heap[poz1].poz] = time[heap[poz2].poz];
^
user.cpp:19:23: error: assignment of read-only location ‘*(time + ((sizetype)heap.std::vector<_Tp, _Alloc>::operator[]<numbers, std::allocator<numbers> >(((std::vector<numbers>::size_type)poz1)).numbers::poz))’
time[heap[poz1].poz] = time[heap[poz2].poz];
^
user.cpp:19:23: 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:20:21: warning: pointer to a function used in arithmetic [-Wpointer-arith]
time[heap[poz2].poz] = aux;
^
user.cpp:20:23: error: assignment of read-only location ‘*(time + ((sizetype)heap.std::vector<_Tp, _Alloc>::operator[]<numbers, std::allocator<numbers> >(((std::vector<numbers>::size_type)poz2)).numbers::poz))’
time[heap[poz2].poz] = aux;
^
user.cpp:20:23: error: cannot convert ‘int’ to ‘time_t(time_t*) throw () {aka long int(long int*) throw ()}’ in assignment
user.cpp: In function ‘void heapAdd(int)’:
user.cpp:42:7: error: request for member ‘push_back’ in ‘time’, which is of non-class type ‘time_t(time_t*) throw () {aka long int(long int*) throw ()}’
time.push_back(j);
^
user.cpp:43:18: error: request for member ‘size’ in ‘time’, which is of non-class type ‘time_t(time_t*) throw () {aka long int(long int*) throw ()}’
temp.poz = time.size()-1;
^
user.cpp: In function ‘void heapDel(int)’:
user.cpp:55:17: warning: pointer to a function used in arithmetic [-Wpointer-arith]
if (j == time[i])
^
user.cpp:55:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
user.cpp:58:14: 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 !