What you seem to need is
a structure representing a 4-char string (e.g. char[4] or std::string), e.g. called "Element".
an array of 50 elements of this type (e.g. std::vector or a play array), e.g. called "ElementContainer"
a loop iterating over each Element of the ElementContainer and feeding it into a processing function
a function accepting that Element, and finding either of the mentioned characters.
Which of these are you having trouble with?
Example:
typedef char[4] Element1;
typedef std::string Element2;
struct Element3 { // slightly OO
char[4] chars;
bool has( char c ) const {
return std::find( chars, chars+4, c ) != chars+4;
}
};
// a container
Element3 elements[] = {
"adda", "bebe", "xxpo", ...
};
Element3* afterlast = elements + sizeof(elements)/sizeof(elements[0]);
// a function:
void dispatch( Element3& element ) {
if( element.has( 'a' ) ) return do_a();
if( element.has( 'e' ) ) return do_e();
if( element.has( 'o' ) ) return do_o();
}
//iteration
std::for_each( elements, afterlast, &dispatch );