Borderou de evaluare (job #2738437)
Utilizator | Data | 5 aprilie 2021 20:42:59 | |
---|---|---|---|
Problema | Heapuri | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:8:33: error: 'int time [200001]' redeclared as different kind of symbol
int pos[NMAX + 1], time[NMAX + 1];
^
In file included from /usr/include/pthread.h:24:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/6/bits/gthr.h:148,
from /usr/include/c++/6/ext/atomicity.h:35,
from /usr/include/c++/6/bits/ios_base.h:39,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from main.cpp:1:
/usr/include/time.h:192:15: note: previous declaration 'time_t time(time_t*)'
extern time_t time (time_t *__timer) __THROW;
^~~~
main.cpp: In function 'void swapHeapElem(int, int)':
main.cpp:63:18: warning: pointer to a function used in arithmetic [-Wpointer-arith]
myswap(time[a], time[b]);
^
main.cpp:63:27: warning: pointer to a function used in arithmetic [-Wpointer-arith]
myswap(time[a], time[b]);
^
main.cpp:63:18: error: invalid conversion from 'time_t (*)(time_t*) throw () {aka long int (*)(long int*) throw ()}' to 'int' [-fpermissive]
myswap(time[a], time[b]);
~~~~~~^
main.cpp:54:13: note: initializing argument 1 of 'void myswap(int&, int&)'
inline void myswap(int &a, int &b)
^~~~~~
main.cpp:63:18: error: cannot bind rvalue '(int)(time + ((sizetype)a))' to 'int&'
myswap(time[a], time[b]);
~~~~~~^
main.cpp:64:22: warning: pointer to a function used in arithmetic [-Wpointer-arith]
myswap(pos[time[a]], pos[time[b]]);
^
main.cpp:64:23: error: invalid types 'int [200001][time_t(time_t*) throw () {aka long int(long int*) throw ()}]' for array subscript
myswap(pos[time[a]], pos[time[b]]);
^
main.cpp:64:36: warning: pointer to a function used in arithmetic [-Wpointer-arith]
myswap(pos[time[a]], pos[time[b]]);
^
main.cpp:64:37: error: invalid types 'int [200001][time_t(time_t*) throw () {aka long int(long int*) throw ()}]' for array subscript
myswap(pos[time[a]], pos[time[b]]);
^
main.cpp: In function 'int ins(int, int)':
main.cpp:108:18: warning: pointer to a function used in arithmetic [-Wpointer-arith]
time[lastNode] = t;
^
main.cpp:108:22: error: assignment of read-only location '*(time + ((sizetype)lastNode))'
time[lastNode] = t;
^
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !