#include <iostream>
bool CharExist(std::string s, char ch) {
return s.find(ch) != std::string::npos;
}
int main()
{
std::string s = "C++ Programming";
if (CharExist(s, 'P'))
std::cout << "Found" << "\n";
else
std::cout << "Not Found" << "\n";
if (CharExist(s, 'p'))
std::cout << "Found" << "\n";
else
std::cout << "Not Found" << "\n";
}
/*
run:
Found
Not Found
*/