#1177
Să se scrie o funcție C++ care determină și șterge dintr-o lista simplu înlănțuită un element dat.
| Problema | FListaStergere1 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64717397 | Utilizator | |
| Fișier | flistastergere1.cpp | Dimensiune | 216 B |
| Data încărcării | 25 Mai 2026, 19:49 | Scor/rezultat | Eroare de compilare |
flistastergere1.cpp: In function ‘void sterge(nod*&, nod*)’: flistastergere1.cpp:45:10: error: ‘nou’ was not declared in this scope; did you mean ‘nod’? 45 | for(nou = p; nou->urm!=q; nou=nou->urm) | ^~~ | nod flistastergere1.cpp:47:9: error: ‘nou’ was not declared in this scope; did you mean ‘nod’? 47 | nou->urm=q-urm; | ^~~ | nod flistastergere1.cpp:47:20: error: ‘urm’ was not declared in this scope 47 | nou->urm=q-urm; | ^~~ flistastergere1.cpp:52:1: error: a function-definition is not allowed here before ‘{’ token 52 | { | ^ flistastergere1.cpp:61:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 61 | int main() | ^~ flistastergere1.cpp:61:9: note: remove parentheses to default-initialize a variable 61 | int main() | ^~ | -- flistastergere1.cpp:61:9: note: or replace parentheses with braces to value-initialize a variable flistastergere1.cpp:62:1: error: a function-definition is not allowed here before ‘{’ token 62 | { | ^ flistastergere1.cpp:77:2: error: expected ‘}’ at end of input 77 | } | ^ flistastergere1.cpp:38:1: note: to match this ‘{’ 38 | { | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema FListaStergere1 face parte din a doua categorie. Pentru aceste probleme se folosește un program suport, furnizat de propunătorul problemei. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.