#3801
LsiInterclasare
C++
Să se scrie o funcție care interclasează nodurile a două liste.
Folclorul informatic
Problema | LsiInterclasare | Operații I/O |
lsiinterclasare.in /lsiinterclasare.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 16 MB
/
Stivă 8 MB
|
Id soluție | #42986868 | Utilizator | |
Fișier | lsiinterclasare.cpp | Dimensiune | 1.13 KB |
Data încărcării | 25 Martie 2023, 19:20 | Scor / rezultat | Eroare de compilare |
lsiinterclasare.cpp: In function 'void LsiInterclasare(Nod*, Nod*, Nod*&)': lsiinterclasare.cpp:59:25: error: no matching function for call to 'Nod::Nod()' Nod p = new Nod; ^ lsiinterclasare.cpp:59:25: note: candidates are: lsiinterclasare.cpp:8:5: note: Nod::Nod(int, int) Nod(int _id, int x) ^ lsiinterclasare.cpp:8:5: note: candidate expects 2 arguments, 0 provided lsiinterclasare.cpp:4:8: note: constexpr Nod::Nod(const Nod&) struct Nod ^ lsiinterclasare.cpp:4:8: note: candidate expects 1 argument, 0 provided lsiinterclasare.cpp:4:8: note: constexpr Nod::Nod(Nod&&) lsiinterclasare.cpp:4:8: note: candidate expects 1 argument, 0 provided lsiinterclasare.cpp:60:14: error: base operand of '->' has non-pointer type 'Nod' p->info = h1->info; ^ lsiinterclasare.cpp:61:14: error: base operand of '->' has non-pointer type 'Nod' p->leg = NULL; ^ lsiinterclasare.cpp:64:19: error: cannot convert 'Nod' to 'Nod*' in assignment h = p; ^ lsiinterclasare.cpp:66:24: error: cannot convert 'Nod' to 'Nod*' in assignment h->leg = p; ^ lsiinterclasare.cpp:73:25: error: no matching function for call to 'Nod::Nod()' Nod p = new Nod; ^ lsiinterclasare.cpp:73:25: note: candidates are: lsiinterclasare.cpp:8:5: note: Nod::Nod(int, int) Nod(int _id, int x) ^ lsiinterclasare.cpp:8:5: note: candidate expects 2 arguments, 0 provided lsiinterclasare.cpp:4:8: note: constexpr Nod::Nod(const Nod&) struct Nod ^ lsiinterclasare.cpp:4:8: note: candidate expects 1 argument, 0 provided lsiinterclasare.cpp:4:8: note: constexpr Nod::Nod(Nod&&) lsiinterclasare.cpp:4:8: note: candidate expects 1 argument, 0 provided lsiinterclasare.cpp:74:14: error: base operand of '->' has non-pointer type 'Nod' p->info = h2->info; ^ lsiinterclasare.cpp:75:14: error: base operand of '->' has non-pointer type 'Nod' p->leg = NULL; ^ lsiinterclasare.cpp:78:19: error: cannot convert 'Nod' to 'Nod*' in assignment h = p; ^ lsiinterclasare.cpp:80:24: error: cannot convert 'Nod' to 'Nod*' in assignment h->leg = p; ^ lsiinterclasare.cpp:90:22: error: no matching function for call to 'Nod::Nod()' Nod *p = new Nod; ^ lsiinterclasare.cpp:90:22: note: candidates are: lsiinterclasare.cpp:8:5: note: Nod::Nod(int, int) Nod(int _id, int x) ^ lsiinterclasare.cpp:8:5: note: candidate expects 2 arguments, 0 provided lsiinterclasare.cpp:4:8: note: constexpr Nod::Nod(const Nod&) struct Nod ^ lsiinterclasare.cpp:4:8: note: candidate expects 1 argument, 0 provided lsiinterclasare.cpp:4:8: note: constexpr Nod::Nod(Nod&&) lsiinterclasare.cpp:4:8: note: candidate expects 1 argument, 0 provided lsiinterclasare.cpp:101:22: error: no matching function for call to 'Nod::Nod()' Nod *p = new Nod; ^ lsiinterclasare.cpp:101:22: note: candidates are: lsiinterclasare.cpp:8:5: note: Nod::Nod(int, int) Nod(int _id, int x) ^ lsiinterclasare.cpp:8:5: note: candidate expects 2 arguments, 0 provided lsiinterclasare.cpp:4:8: note: constexpr Nod::Nod(const Nod&) struct Nod ^ lsiinterclasare.cpp:4:8: note: candidate expects 1 argument, 0 provided lsiinterclasare.cpp:4:8: note: constexpr Nod::Nod(Nod&&) lsiinterclasare.cpp:4:8: note: candidate expects 1 argument, 0 provided
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema LsiInterclasare 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ă.