Basically I want to check a string array to see if any of the words match “and”.
- Is this possible?
- Can you push me in the right direction?
Thanks
I should make it clear that the words are char put together best way to explain is an example
abc defg hijk and lmnop <– each character is in its own element
I recommend you use
std::stringand not null-terminatedchar*strings (maybe you already are — hard to be sure). And use a standard container rather than an array. Then usestd::find(which would work on an array too, but containers are better).