#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 | #53882059 | Utilizator | |
Fișier | pbinfo.cpp | Dimensiune | 430 B |
Data încărcării | 13 Noiembrie 2024, 21:23 | 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:10:5: error: reference to 'cin' is ambiguous cin.getline(s, 256); ^ 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:12: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>>t[i]; ^ 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:16:36: error: reference to 'cout' is ambiguous if(strstr(s, t[i])!=NULL) {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:19:35: error: reference to 'cout' is ambiguous if(strstr(s, "virus")!= NULL) 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:20:10: error: reference to 'cout' is ambiguous else 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ă.