Borderou de evaluare (job #1318971)
Utilizator | Data | 16 ianuarie 2015 15:34:57 | |
---|---|---|---|
Problema | Lupul Urias si Rau | Status | done |
Runda | Teme Pregatire ACM Unibuc 2014, Anul I | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:14:14: error: ‘int time [100005]’ redeclared as different kind of symbol
int time[Nmax];
^
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/ios_base.h:39,
from /usr/include/c++/4.8/ios:42,
from /usr/include/c++/4.8/ostream:38,
from /usr/include/c++/4.8/iostream:39,
from user.cpp:1:
/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 member function ‘bool compare2::operator()(int, int)’:
user.cpp:25:49: warning: pointer to a function used in arithmetic [-Wpointer-arith]
bool operator () (int i, int j) { return time[i] < time[j]; }
^
user.cpp:25:59: warning: pointer to a function used in arithmetic [-Wpointer-arith]
bool operator () (int i, int j) { return time[i] < time[j]; }
^
user.cpp: In function ‘int main()’:
user.cpp:37:27: warning: pointer to a function used in arithmetic [-Wpointer-arith]
if (distance > x) time[i] = -1;
^
user.cpp:37:29: error: assignment of read-only location ‘*(time + ((sizetype)i))’
if (distance > x) time[i] = -1;
^
user.cpp:37:29: error: cannot convert ‘int’ to ‘time_t(time_t*)throw () {aka long int(long int*)throw ()}’ in assignment
user.cpp:38:14: warning: pointer to a function used in arithmetic [-Wpointer-arith]
else time[i] = (x - distance) / l;
^
user.cpp:38:16: error: assignment of read-only location ‘*(time + ((sizetype)i))’
else time[i] = (x - distance) / l;
^
user.cpp:38:16: error: cannot convert ‘int’ to ‘time_t(time_t*)throw () {aka long int(long int*)throw ()}’ in assignment
user.cpp:40:34: warning: pointer to a function used in arithmetic [-Wpointer-arith]
max_time = max(max_time, time[i]);
^
user.cpp:40:35: error: no matching function for call to ‘max(int&, time_t (&)(time_t*)throw ())’
max_time = max(max_time, time[i]);
^
user.cpp:40:35: note: candidates are:
In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0,
from /usr/include/c++/4.8/ios:40,
from /usr/include/c++/4.8/ostream:38,
from /usr/include/c++/4.8/iostream:39,
from user.cpp:1:
/usr/include/c++/4.8/bits/stl_algobase.h:216:5: note: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !