Borderou de evaluare (job #2234298)

Utilizator Mihai145Oprea Mihai Adrian Mihai145 Data 25 august 2018 15:03:50
Problema Reteta2 Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:14:5: error: ‘int time’ redeclared as different kind of symbol int time, nrIngredients, quantities[NR]; ^~~~ 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/ios_base.h:39, from /usr/include/c++/6/ios:42, from /usr/include/c++/6/istream:38, from /usr/include/c++/6/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 ‘int searchIngredients(char*, int)’: user.cpp:24:46: warning: converting to non-pointer type ‘char’ from NULL [-Wconversion-null] ingredients[nrIngredients][nameLenght] = NULL; ^~~~ user.cpp: In function ‘int main()’: user.cpp:50:31: warning: converting to non-pointer type ‘char’ from NULL [-Wconversion-null] den[nameLenght] = NULL; ^~~~ user.cpp:69:25: warning: pointer to a function used in arithmetic [-Wpointer-arith] time += number; ^~~~~~ user.cpp:69:25: error: assignment of function ‘time_t time(time_t*)’ user.cpp:69:25: 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:79:13: warning: the address of ‘time_t time(time_t*)’ will always evaluate as ‘true’ [-Waddress] fout << time << '\n'; ^~~~

Ceva nu functioneaza?