#1346
PbInfo
C++
Dându-se un șir de caractere și mai multe cuvinte, să se afle dacă există cuvinte care apar în şir.
Problema | PbInfo | Operații I/O |
pbinfo.in /pbinfo.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #53222635 | Utilizator | |
Fișier | pbinfo.cpp | Dimensiune | 1.06 KB |
Data încărcării | 21 Octombrie 2024, 19:39 | Scor / rezultat | Eroare de compilare |
pbinfo.cpp:4:13: error: variable 'std::ifstream cin' has initializer but incomplete type ifstream cin("pbinfo.in"); ^ pbinfo.cpp:5:14: error: variable 'std::ofstream cout' has initializer but incomplete type ofstream cout("pbinfo.out"); ^ pbinfo.cpp: In function 'int main()': pbinfo.cpp:9:5: error: reference to 'cin' is ambiguous cin.getline(a , 101); ^ pbinfo.cpp:4:10: note: candidates are: <typeprefixerror>cin ifstream cin("pbinfo.in"); ^ In file included from pbinfo.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ pbinfo.cpp:11:5: error: reference to 'cin' is ambiguous cin >> n; ^ pbinfo.cpp:4:10: note: candidates are: <typeprefixerror>cin ifstream cin("pbinfo.in"); ^ In file included from pbinfo.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ pbinfo.cpp:15:9: error: reference to 'cin' is ambiguous cin >> b; ^ pbinfo.cpp:4:10: note: candidates are: <typeprefixerror>cin ifstream cin("pbinfo.in"); ^ In file included from pbinfo.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ pbinfo.cpp:49:9: error: reference to 'cout' is ambiguous cout << "DA"; ^ pbinfo.cpp:5:10: note: candidates are: <typeprefixerror>cout ofstream cout("pbinfo.out"); ^ In file included from pbinfo.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ pbinfo.cpp:51:9: error: reference to 'cout' is ambiguous cout << "NU"; ^ pbinfo.cpp:5:10: note: candidates are: <typeprefixerror>cout ofstream cout("pbinfo.out"); ^ In file included from pbinfo.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema PbInfo 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ă.