Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
#27
#include <iostream> #include <string> using namespace std; bool szukaj( std::string &tekst, std::string wyraz1, std::string wyraz2 ) { if ( (tekst.find(wyraz1) != string::npos) && (tekst.find(wyraz2) != string::npos) ) return true; return false; } void wypiszWynik( bool czyZnaleziono ) { if( czyZnaleziono ) std::cout << "Znaleziono" << std::endl; else std::cout << "Nie znaleziono" << std::endl; } int main() { std::string napis = "Zadanie domowe z kursu C++ (http://cpp0x.pl) - najlepszy kurs C++ w Internecie!"; wypiszWynik( szukaj( napis, "ada", "kurs" ) ); wypiszWynik( szukaj( napis, "ada", "taki" ) ); wypiszWynik( szukaj( napis, "C++", "cpp0x" ) ); wypiszWynik( szukaj( napis, "C#", "cpp0x" ) ); return 0; }
run
|
edit
|
history
|
help
0
SFINAE with std::enable_if
vector of bool
variable template not supported
VC++ Template Comment
Not an overflow
masodijegy.cpp
primitive type copy constructor
Runner-mt
hangman
VS2013 hello world includes