Borderou de evaluare (job #2201004)

Utilizator Robert_VRVRobert Vadastreanu Robert_VRV Data 3 mai 2018 09:41:31
Problema Reteta2 Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:6:5: error: ‘int time’ redeclared as different kind of symbol int time; ^~~~ In file included from /usr/include/pthread.h:24:0, from /usr/include/x86_64-linux-gnu/c++/6/32/bits/gthr-default.h:35, from /usr/include/x86_64-linux-gnu/c++/6/32/bits/gthr.h:148, from /usr/include/c++/6/ext/atomicity.h:35, from /usr/include/c++/6/bits/basic_string.h:39, from /usr/include/c++/6/string:52, from /usr/include/c++/6/stdexcept:39, from /usr/include/c++/6/array:39, from /usr/include/c++/6/tuple:39, from /usr/include/c++/6/bits/stl_map.h:63, from /usr/include/c++/6/map:61, from user.cpp:2: /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 read()’: user.cpp:19:13: warning: pointer to a function used in arithmetic [-Wpointer-arith] time += t; ^ user.cpp:19:13: error: assignment of function ‘time_t time(time_t*)’ user.cpp:19:13: error: cannot convert ‘time_t (*)(time_t*) throw () {aka long int (*)(long int*) throw ()}’ to ‘time_t(time_t*) throw () {aka long int(long int*) throw ()}’ in assignment user.cpp: In function ‘int main()’: user.cpp:37:22: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘time_t (*)(time_t*) throw () {aka long int (*)(long int*) throw ()}’ [-Wformat=] printf("%d\n", time); ^ user.cpp: In function ‘void read()’: user.cpp:13:18: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%c", &c); ^ user.cpp:18:20: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d", &t); ^ user.cpp:23:27: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%s %d", s2, &t); ^ user.cpp: In function ‘int main()’: user.cpp:33:36: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("reteta2.in", "r", stdin); ^ user.cpp:34:38: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("reteta2.out", "w", stdout); ^

Ceva nu functioneaza?