Borderou de evaluare (job #1107888)
Utilizator | Data | 14 februarie 2014 18:36:44 | |
---|---|---|---|
Problema | Heapuri | Status | done |
Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:6:34: error: ‘int time [200001]’ redeclared as different kind of symbol
int heap[MAX], pos[MAX], time[MAX];
^
In file included from /usr/include/pthread.h:26:0,
from /usr/local/include/c++/4.8.0/i686-pc-linux-gnu/bits/gthr-default.h:35,
from /usr/local/include/c++/4.8.0/i686-pc-linux-gnu/bits/gthr.h:148,
from /usr/local/include/c++/4.8.0/ext/atomicity.h:33,
from /usr/local/include/c++/4.8.0/bits/basic_string.h:39,
from /usr/local/include/c++/4.8.0/string:52,
from /usr/local/include/c++/4.8.0/random:41,
from /usr/local/include/c++/4.8.0/bits/stl_algo.h:65,
from /usr/local/include/c++/4.8.0/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 ‘void add()’:
user.cpp:43:11: warning: pointer to a function used in arithmetic [-Wpointer-arith]
time[p] = T;
^
user.cpp:43:13: error: assignment of read-only location ‘*(time + ((sizetype)p))’
time[p] = T;
^
user.cpp:43:13: error: cannot convert ‘int’ to ‘time_t(time_t*)throw () {aka long int(long int*)throw ()}’ in assignment
user.cpp:47:29: warning: pointer to a function used in arithmetic [-Wpointer-arith]
std::swap(pos[time[p]], pos[time[p/2]]);
^
user.cpp:47:30: error: invalid types ‘int [200001][time_t(time_t*)throw () {aka long int(long int*)throw ()}]’ for array subscript
std::swap(pos[time[p]], pos[time[p/2]]);
^
user.cpp:47:45: warning: pointer to a function used in arithmetic [-Wpointer-arith]
std::swap(pos[time[p]], pos[time[p/2]]);
^
user.cpp:47:46: error: invalid types ‘int [200001][time_t(time_t*)throw () {aka long int(long int*)throw ()}]’ for array subscript
std::swap(pos[time[p]], pos[time[p/2]]);
^
user.cpp:48:25: warning: pointer to a function used in arithmetic [-Wpointer-arith]
std::swap(time[p], time[p/2]);
^
user.cpp:48:36: warning: pointer to a function used in arithmetic [-Wpointer-arith]
std::swap(time[p], time[p/2]);
^
user.cpp: In function ‘void del()’:
user.cpp:60:11: warning: pointer to a function used in arithmetic [-Wpointer-arith]
time[p] = time[C];
^
user.cpp:60:21: warning: pointer to a function used in arithmetic [-Wpointer-arith]
time[p] = time[C];
^
user.cpp:60:13: error: assignment of read-only location ‘*(time + ((sizetype)p))’
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !