Borderou de evaluare (job #3125612)

Utilizator florinilie324Ilie Florin Alexandru florinilie324 Data 3 mai 2023 21:09:57
Problema Arbori binari de cautare echilibrati Status done
Runda arhiva-test Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'Nod* sterge(Nod*, int)': main.cpp:128:19: error: 's' was not declared in this scope 128 | }s | ^ main.cpp:132:15: error: expected '}' before 'else' 132 | } else | ^~~~ main.cpp:121:68: note: to match this '{' 121 | if ((nod->stanga == nullptr) || (nod->dreapta == nullptr)) { | ^ main.cpp:133:25: error: 'temp' was not declared in this scope; did you mean 'tm'? 133 | *nod = *temp; | ^~~~ | tm main.cpp:135:20: error: 'temp' was not declared in this scope; did you mean 'tm'? 135 | delete temp; | ^~~~ | tm main.cpp:136:11: error: 'else' without a previous 'if' 136 | } else { | ^~~~ main.cpp: At global scope: main.cpp:143:5: error: expected unqualified-id before 'if' 143 | if (nod == nullptr) | ^~ main.cpp:146:5: error: 'nod' does not name a type; did you mean 'Nod'? 146 | nod->inaltime = 1 + max(inaltime(nod->stanga), inaltime(nod->dreapta)); | ^~~ | Nod main.cpp:148:28: error: 'nod' was not declared in this scope; did you mean 'Nod'? 148 | int balans = echilibru(nod); | ^~~ | Nod main.cpp:151:5: error: expected unqualified-id before 'if' 151 | if (balans > 1 && echilibru(nod->stanga) >= 0) | ^~ main.cpp:155:5: error: expected unqualified-id before 'if' 155 | if (balans > 1 && echilibru(nod->stanga) < 0) { | ^~ main.cpp:161:5: error: expected unqualified-id before 'if' 161 | if (balans < -1 && echilibru(nod->dreapta) <= 0) | ^~ main.cpp:165:5: error: expected unqualified-id before 'if' 165 | if (balans < -1 && echilibru(nod->dreapta) > 0) { | ^~ main.cpp:170:5: error: expected unqualified-id before 'return' 170 | return nod; | ^~~~~~ main.cpp:171:1: error: expected declaration before '}' token 171 | } Non zero exit status: 1

Ceva nu functioneaza?