#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 | #36419216 | Utilizator | |
Fișier | lsiinterclasare.cpp | Dimensiune | 1.14 KB |
Data încărcării | 30 Aprilie 2022, 15:31 | Scor / rezultat | Eroare de compilare |
lsiinterclasare.cpp: In function 'void LsiInterclasare(Nod*, Nod*, Nod*&)': lsiinterclasare.cpp:57:15: error: no matching function for call to 'Nod::Nod()' h=new Nod; ^ lsiinterclasare.cpp:57:15: 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:59:12: error: 'struct Nod' has no member named 'urm' h->urm=NULL; ^ lsiinterclasare.cpp:60:16: error: 'struct Nod' has no member named 'urm' h1=h1->urm; ^ lsiinterclasare.cpp:63:15: error: no matching function for call to 'Nod::Nod()' h=new Nod; ^ lsiinterclasare.cpp:63:15: 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:65:12: error: 'struct Nod' has no member named 'urm' h->urm=NULL; ^ lsiinterclasare.cpp:66:16: error: 'struct Nod' has no member named 'urm' h2=h2->urm; ^ lsiinterclasare.cpp:71:13: error: 'aux' was not declared in this scope aux=new Nod; ^ lsiinterclasare.cpp:71:21: error: no matching function for call to 'Nod::Nod()' aux=new Nod; ^ lsiinterclasare.cpp:71:21: 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:73:16: error: 'struct Nod' has no member named 'urm' q->urm=aux; ^ lsiinterclasare.cpp:75:16: error: 'struct Nod' has no member named 'urm' q->urm=NULL; ^ lsiinterclasare.cpp:76:20: error: 'struct Nod' has no member named 'urm' h1=h1->urm; ^ lsiinterclasare.cpp:79:13: error: 'aux' was not declared in this scope aux=new Nod; ^ lsiinterclasare.cpp:79:21: error: no matching function for call to 'Nod::Nod()' aux=new Nod; ^ lsiinterclasare.cpp:79:21: 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:81:16: error: 'struct Nod' has no member named 'urm' q->urm=aux; ^ lsiinterclasare.cpp:83:16: error: 'struct Nod' has no member named 'urm' q->urm=NULL; ^ lsiinterclasare.cpp:84:20: error: 'struct Nod' has no member named 'urm' h2=h2->urm; ^ lsiinterclasare.cpp:89:13: error: 'aux' was not declared in this scope aux=new Nod; ^ lsiinterclasare.cpp:89:21: error: no matching function for call to 'Nod::Nod()' aux=new Nod; ^ lsiinterclasare.cpp:89:21: 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:91:16: error: 'struct Nod' has no member named 'urm' q->urm=aux; ^ lsiinterclasare.cpp:93:16: error: 'struct Nod' has no member named 'urm' q->urm=NULL; ^ lsiinterclasare.cpp:94:20: error: 'struct Nod' has no member named 'urm' h1=h1->urm; ^ lsiinterclasare.cpp:99:13: error: 'aux' was not declared in this scope aux=new Nod; ^ lsiinterclasare.cpp:99:21: error: no matching function for call to 'Nod::Nod()' aux=new Nod; ^ lsiinterclasare.cpp:99:21: 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:16: error: 'struct Nod' has no member named 'urm' q->urm=aux; ^ lsiinterclasare.cpp:103:16: error: 'struct Nod' has no member named 'urm' q->urm=NULL; ^ lsiinterclasare.cpp:104:20: error: 'struct Nod' has no member named 'urm' h2=h2->urm; ^ lsiinterclasare.cpp:55:14: warning: unused variable 'p' [-Wunused-variable] Nod* q,*p; ^
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ă.