#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 | #31191437 | Utilizator | |
Fișier | lsiinterclasare.cpp | Dimensiune | 510 B |
Data încărcării | 06 Octombrie 2021, 07:59 | Scor / rezultat | Eroare de compilare |
lsiinterclasare.cpp: In function 'void LsiInterclasare(Nod*, Nod*, Nod&)': lsiinterclasare.cpp:54:7: error: no matching function for call to 'Nod::Nod()' Nod man; ^ lsiinterclasare.cpp:54:7: 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:56:9: error: no match for 'operator=' (operand types are 'Nod' and 'Nod*') man = h1; ^ lsiinterclasare.cpp:56:9: note: candidates are: lsiinterclasare.cpp:4:8: note: Nod& Nod::operator=(const Nod&) struct Nod ^ lsiinterclasare.cpp:4:8: note: no known conversion for argument 1 from 'Nod*' to 'const Nod&' lsiinterclasare.cpp:4:8: note: Nod& Nod::operator=(Nod&&) lsiinterclasare.cpp:4:8: note: no known conversion for argument 1 from 'Nod*' to 'Nod&&' lsiinterclasare.cpp:61:9: error: no match for 'operator=' (operand types are 'Nod' and 'Nod*') man = h2; ^ lsiinterclasare.cpp:61:9: note: candidates are: lsiinterclasare.cpp:4:8: note: Nod& Nod::operator=(const Nod&) struct Nod ^ lsiinterclasare.cpp:4:8: note: no known conversion for argument 1 from 'Nod*' to 'const Nod&' lsiinterclasare.cpp:4:8: note: Nod& Nod::operator=(Nod&&) lsiinterclasare.cpp:4:8: note: no known conversion for argument 1 from 'Nod*' to 'Nod&&' lsiinterclasare.cpp:67:12: error: base operand of '->' has non-pointer type 'Nod' man->leg = h1; ^ lsiinterclasare.cpp:68:18: error: base operand of '->' has non-pointer type 'Nod' man = man->leg; ^ lsiinterclasare.cpp:72:12: error: base operand of '->' has non-pointer type 'Nod' man->leg = h2; ^ lsiinterclasare.cpp:73:18: error: base operand of '->' has non-pointer type 'Nod' man = man->leg; ^ lsiinterclasare.cpp:78:8: error: base operand of '->' has non-pointer type 'Nod' man->leg = h1; ^ lsiinterclasare.cpp:81:9: error: base operand of '->' has non-pointer type 'Nod' man ->leg = h2; ^ lsiinterclasare.cpp: In function 'int main()': lsiinterclasare.cpp:88:30: error: invalid initialization of reference of type 'Nod&' from expression of type 'Nod*' LsiInterclasare(h1, h2, h); ^ lsiinterclasare.cpp:53:6: error: in passing argument 3 of 'void LsiInterclasare(Nod*, Nod*, Nod&)' void LsiInterclasare(Nod *h1, Nod *h2, Nod &h){ ^
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ă.