#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 | #42986733 | Utilizator | |
Fișier | lsiinterclasare.cpp | Dimensiune | 1.13 KB |
Data încărcării | 25 Martie 2023, 19:12 | Scor / rezultat | Eroare de compilare |
lsiinterclasare.cpp: In function 'void LsiInterclasare(Nod*, Nod*, Nod*&)': lsiinterclasare.cpp:59:26: error: no matching function for call to 'Nod::Nod()' Nod *p = new Nod; ^ lsiinterclasare.cpp:59:26: 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:61:16: error: 'struct Nod' has no member named 'urm' p->urm = NULL; ^ lsiinterclasare.cpp:66:20: error: 'struct Nod' has no member named 'urm' h->urm = p; ^ lsiinterclasare.cpp:68:22: error: 'struct Nod' has no member named 'urm' h1 = h1->urm; ^ lsiinterclasare.cpp:73:26: error: no matching function for call to 'Nod::Nod()' Nod *p = new Nod; ^ lsiinterclasare.cpp:73:26: 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:75:16: error: 'struct Nod' has no member named 'urm' p->urm = NULL; ^ lsiinterclasare.cpp:80:20: error: 'struct Nod' has no member named 'urm' h->urm = p; ^ lsiinterclasare.cpp:82:22: error: 'struct Nod' has no member named 'urm' h2 = h2->urm; ^ lsiinterclasare.cpp:85:16: error: 'struct Nod' has no member named 'urm' h = h->urm; ^ 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:92:12: error: 'struct Nod' has no member named 'urm' p->urm = h1->urm; ^ lsiinterclasare.cpp:92:22: error: 'struct Nod' has no member named 'urm' p->urm = h1->urm; ^ lsiinterclasare.cpp:94:12: error: 'struct Nod' has no member named 'urm' h->urm = p; ^ lsiinterclasare.cpp:95:16: error: 'struct Nod' has no member named 'urm' h = h->urm; ^ lsiinterclasare.cpp:96:18: error: 'struct Nod' has no member named 'urm' h1 = h1->urm; ^ 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 lsiinterclasare.cpp:103:12: error: 'struct Nod' has no member named 'urm' p->urm = h2->urm; ^ lsiinterclasare.cpp:103:22: error: 'struct Nod' has no member named 'urm' p->urm = h2->urm; ^ lsiinterclasare.cpp:105:12: error: 'struct Nod' has no member named 'urm' h->urm = p; ^ lsiinterclasare.cpp:106:16: error: 'struct Nod' has no member named 'urm' h = h->urm; ^ lsiinterclasare.cpp:107:18: error: 'struct Nod' has no member named 'urm' h2 = h2->urm; ^
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ă.