#1476
FSortare
C++
Să se scrie o funcție C++
care sortează crescător elementele unei liste simplu înlănţuite.
Problema | FSortare | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #29536012 | Utilizator | |
Fișier | fsortare.cpp | Dimensiune | 364 B |
Data încărcării | 07 Mai 2021, 12:55 | Scor / rezultat | Eroare de compilare |
fsortare.cpp: In function 'void sortareCrescator(nod*&)': fsortare.cpp:33:15: error: no match for 'operator=' (operand types are 'nod' and 'nod*') for (p=prim;p->urm!=NULL;p=p->urm) ^ fsortare.cpp:33:15: note: candidates are: fsortare.cpp:3:8: note: nod& nod::operator=(const nod&) struct nod{ ^ fsortare.cpp:3:8: note: no known conversion for argument 1 from 'nod*' to 'const nod&' fsortare.cpp:3:8: note: nod& nod::operator=(nod&&) fsortare.cpp:3:8: note: no known conversion for argument 1 from 'nod*' to 'nod&&' fsortare.cpp:33:22: error: base operand of '->' has non-pointer type 'nod' for (p=prim;p->urm!=NULL;p=p->urm) ^ fsortare.cpp:33:37: error: base operand of '->' has non-pointer type 'nod' for (p=prim;p->urm!=NULL;p=p->urm) ^ fsortare.cpp:34:18: error: base operand of '->' has non-pointer type 'nod' if (p->info>p->urm->info) ^ fsortare.cpp:34:26: error: base operand of '->' has non-pointer type 'nod' if (p->info>p->urm->info) ^ fsortare.cpp:37:22: error: base operand of '->' has non-pointer type 'nod' aux=p->info; ^ fsortare.cpp:38:18: error: base operand of '->' has non-pointer type 'nod' p->info=p->urm->info; ^ fsortare.cpp:38:26: error: base operand of '->' has non-pointer type 'nod' p->info=p->urm->info; ^ fsortare.cpp:39:18: error: base operand of '->' has non-pointer type 'nod' p->urm->info=aux; ^ fsortare.cpp:28:11: warning: unused variable 'q' [-Wunused-variable] nod p,q; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema FSortare 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ă.