Problema | Anagrame1 | Operații I/O |
anagrame1.in /anagrame1.out
|
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #49378809 | Utilizator | |
Fișier | anagrame1.cpp | Dimensiune | 552 B |
Data încărcării | 28 Februarie 2024, 11:44 | Scor / rezultat | Eroare de compilare |
anagrame1.cpp:4:1: error: expected ',' or ';' before 'ofstream' ofstream fout("anagrame1.out") ^ anagrame1.cpp: In function 'int main()': anagrame1.cpp:8:16: error: invalid conversion from 'int' to 'std::basic_istream<char>::char_type* {aka char*}' [-fpermissive] fin.get(s,9); ^ In file included from /usr/include/c++/4.8/sstream:38:0, from /usr/include/c++/4.8/complex:45, from /usr/include/c++/4.8/ccomplex:38, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:52, from anagrame1.cpp:1: /usr/include/c++/4.8/istream:354:7: error: initializing argument 1 of 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::get(std::basic_istream<_CharT, _Traits>::char_type*, std::streamsize) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>; std::basic_istream<_CharT, _Traits>::char_type = char; std::streamsize = int]' [-fpermissive] get(char_type* __s, streamsize __n) ^ anagrame1.cpp:9:15: error: invalid conversion from 'int' to 'const char*' [-fpermissive] n=strlen(s); ^ In file included from /usr/include/c++/4.8/cstring:42:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:48, from anagrame1.cpp:1: /usr/include/string.h:399:15: error: initializing argument 1 of 'size_t strlen(const char*)' [-fpermissive] extern size_t strlen (const char *__s) ^ anagrame1.cpp:10:15: error: 'generare' was not declared in this scope generare(1); ^ anagrame1.cpp: In function 'void generare(int)': anagrame1.cpp:17:9: error: 'fout' was not declared in this scope fout <<s[sol[k]-1]; ^ anagrame1.cpp:17:26: error: invalid types 'int[int]' for array subscript fout <<s[sol[k]-1]; ^ anagrame1.cpp:18:9: error: 'fout' was not declared in this scope fout <<'\n'; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Anagrame1 face parte din prima categorie. 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ă.