One option is the unordered_set. Put the characters of interest into the set. Then just check the count of the character in question:
#include
#include
using namespace std;
int main() {
unordered_set characters;
characters.insert('A');
characters.insert('B');
characters.insert('C');
// ...
if (characters.count('A')) {
cout << "found" << endl;
} else {
cout << "not found" << endl;
}
return 0;
}