#1173
FListaNumarare1
C++
Să se scrie o funcție C++ care determină câte perechi de elemente consecutive egale sunt memorate într-o lista simplu înlănțuită.
Problema | FListaNumarare1 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #50988644 | Utilizator | |
Fișier | flistanumarare1.cpp | Dimensiune | 927 B |
Data încărcării | 17 Mai 2024, 11:48 | Scor / rezultat | Eroare de compilare |
flistanumarare1.cpp:41:8: error: redefinition of 'struct nod' struct nod{ ^ flistanumarare1.cpp:4:8: error: previous definition of 'struct nod' struct nod{ ^ flistanumarare1.cpp:54:24: error: expected ',' or '...' before '*' token void Adaugare(void nod * &p, int x) ^ flistanumarare1.cpp:54:20: error: 'nod' has incomplete type void Adaugare(void nod * &p, int x) ^ flistanumarare1.cpp:54:35: error: invalid use of 'void' void Adaugare(void nod * &p, int x) ^ flistanumarare1.cpp: In function 'void Adaugare(<type error>)': flistanumarare1.cpp:56:8: error: 'p' was not declared in this scope if(p == NULL) ^ flistanumarare1.cpp:58:17: error: expected type-specifier before 'nod' p = new nod; ^ flistanumarare1.cpp:58:17: error: expected ';' before 'nod' flistanumarare1.cpp:59:21: error: 'x' was not declared in this scope p -> info = x; ^ flistanumarare1.cpp:64:15: error: 't' was not declared in this scope nod * t = new cod; ^ flistanumarare1.cpp:64:23: error: expected type-specifier before 'cod' nod * t = new cod; ^ flistanumarare1.cpp:64:23: error: expected ';' before 'cod' flistanumarare1.cpp:65:21: error: 'x' was not declared in this scope t -> info = x; ^ flistanumarare1.cpp:67:14: error: 'q' was not declared in this scope nod *q = p; ^ flistanumarare1.cpp: In function 'int main()': flistanumarare1.cpp:119:5: error: redefinition of 'int main()' int main() ^ flistanumarare1.cpp:85:5: error: 'int main()' previously defined here int main() ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema FListaNumarare1 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ă.