Borderou de evaluare (job #798280)

Utilizator avatar danihere Daniel Dubrovschi danihere IP ascuns
Problemă Brățara (clasele 5/6) Compilator cpp-32
Rundă Arhiva de probleme Status evaluat
Dată 30 nov. 2024 15:52:27 Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int getFirstDigits(int)': main.cpp:17:12: warning: 'd2' may be used uninitialized [-Wmaybe-uninitialized] 17 | return d2; | ^~ main.cpp:11:17: note: 'd2' was declared here 11 | int d1 = 0, d2; | ^~ main.cpp: In function 'int main()': main.cpp:28:9: warning: 'd2' may be used uninitialized [-Wmaybe-uninitialized] 28 | if (getLastDigits(last_number) == getFirstDigits(c)) { | ^~ main.cpp:11:17: note: 'd2' was declared here 11 | int d1 = 0, d2; | ^~ main.cpp:29:47: warning: 'd2' may be used uninitialized [-Wmaybe-uninitialized] 29 | while (getLastDigits(last_number) == getFirstDigits(c)) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ main.cpp:11:17: note: 'd2' was declared here 11 | int d1 = 0, d2; | ^~