Borderou de evaluare (job #1577111)

Utilizator AndreiGrigorasAndrei Grigoras AndreiGrigoras Data 23 ianuarie 2016 11:29:10
Problema Heapuri Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:9:33: error: ‘int time [200200]’ redeclared as different kind of symbol int n , op , value , time[200200] , beg ; ^ 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/istream:38, from /usr/include/c++/4.8/fstream:38, 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 function ‘void read()’: user.cpp:22:27: warning: pointer to a function used in arithmetic [-Wpointer-arith] time[++beg] = value ; ^ user.cpp:22:29: error: assignment of read-only location ‘*(time + ((sizetype)(++ beg)))’ time[++beg] = value ; ^ user.cpp:22:29: error: cannot convert ‘int’ to ‘time_t(time_t*)throw () {aka long int(long int*)throw ()}’ in assignment user.cpp:28:35: warning: pointer to a function used in arithmetic [-Wpointer-arith] H.erase(time[value]) ; ^ user.cpp:28:35: error: invalid conversion from ‘time_t (*)(time_t*)throw () {aka long int (*)(long int*)throw ()}’ to ‘std::set<int>::key_type {aka int}’ [-fpermissive] In file included from /usr/include/c++/4.8/set:61:0, from user.cpp:2: /usr/include/c++/4.8/bits/stl_set.h:580:7: error: initializing argument 1 of ‘std::set<_Key, _Compare, _Alloc>::size_type std::set<_Key, _Compare, _Alloc>::erase(const key_type&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; std::set<_Key, _Compare, _Alloc>::size_type = unsigned int; std::set<_Key, _Compare, _Alloc>::key_type = int]’ [-fpermissive] erase(const key_type& __x) ^ user.cpp:13:44: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen ( "heapuri.in" , "r" , stdin ) ; ^ user.cpp:14:25: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf ( "%d" , &n ) ; ^ user.cpp:17:30: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf ( "%d" , &op ) ; ^ user.cpp:21:41: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf ( "%d" , &value ) ; ^ user.cpp:27:41: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf ( "%d" , &value ) ; ^

Ceva nu functioneaza?