Borderou de evaluare (job #2124600)
Utilizator | Data | 7 februarie 2018 13:30:16 | |
---|---|---|---|
Problema | Heapuri | Status | done |
Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:11:17: error: ‘int time [1000000]’ redeclared as different kind of symbol
int time[1000000], t = 0;
^
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 heapAdd(int)’:
user.cpp:42:8: warning: pointer to a function used in arithmetic [-Wpointer-arith]
time[t]=j;
^
user.cpp:42:9: error: assignment of read-only location ‘*(time + ((sizetype)t))’
time[t]=j;
^
user.cpp:42:9: error: cannot convert ‘int’ to ‘time_t(time_t*) throw () {aka long int(long int*) throw ()}’ in assignment
user.cpp:43:22: warning: pointer to a function used in arithmetic [-Wpointer-arith]
temp.poz = &time[t++];
^
user.cpp:43:11: error: cannot convert ‘time_t (*)(time_t*) throw () {aka long int (*)(long int*) throw ()}’ to ‘int*’ in assignment
temp.poz = &time[t++];
^
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]
swap(time[i], j);
^
user.cpp:58:18: error: no matching function for call to ‘swap(time_t (&)(time_t*) throw (), int&)’
swap(time[i], j);
^
user.cpp:13:6: note: candidate: void swap(int, int) <near match>
void swap(int poz1, int poz2) {
^
user.cpp:13:6: note: conversion of argument 1 would be ill-formed:
user.cpp:58:14: error: invalid conversion from ‘time_t (*)(time_t*) throw () {aka long int (*)(long int*) throw ()}’ to ‘int’ [-fpermissive]
swap(time[i], j);
^
In file included from /usr/include/c++/5/vector:65:0,
from user.cpp:2:
/usr/include/c++/5/bits/stl_bvector.h:128:3: note: candidate: void std::swap(bool&, std::_Bit_reference)
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !