Problema | CTF | Operații I/O |
ctf.in /ctf.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #32545956 | Utilizator | |
Fișier | ctf.cpp | Dimensiune | 199 B |
Data încărcării | 18 Noiembrie 2021, 23:46 | Scor / rezultat | Eroare de compilare |
ctf.cpp:4:27: error: too few arguments to function 'FILE* fopen(const char*, const char*)' FILE *fin = fopen("ctf.in"); ^ In file included from /usr/include/c++/4.8/cstdio:42:0, from /usr/include/c++/4.8/ext/string_conversions.h:43, from /usr/include/c++/4.8/bits/basic_string.h:2815, from /usr/include/c++/4.8/string:52, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from ctf.cpp:1: /usr/include/stdio.h:272:14: note: declared here extern FILE *fopen (const char *__restrict __filename, ^ ctf.cpp:5:29: error: too few arguments to function 'FILE* fopen(const char*, const char*)' FILE *fout = fopen("ctf.out"); ^ In file included from /usr/include/c++/4.8/cstdio:42:0, from /usr/include/c++/4.8/ext/string_conversions.h:43, from /usr/include/c++/4.8/bits/basic_string.h:2815, from /usr/include/c++/4.8/string:52, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from ctf.cpp:1: /usr/include/stdio.h:272:14: note: declared here extern FILE *fopen (const char *__restrict __filename, ^ ctf.cpp: In function 'int main()': ctf.cpp:10:23: error: cannot convert 'FILE* {aka _IO_FILE*}' to 'char*' for argument '1' to 'char* fgets(char*, int, FILE*)' fgets(fin, 1005, f); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema CTF 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ă.