You are trying to compare a single character with a whole string:
if(entry[i] == letter)
Instead you could write for example:
if ( letter.find( entry[i] ) != std::string::npos ) {
//...
I tried it on a array char (I made the array with individual letters
from the word) and I had the same error
You may not also to compare a whole array with a character.
If for example the variable letter is declared as a character array then you could use standard C string function strchr declared in header <cstring> to determine whether a character is present in the array.
For example:
#include <cstring>
//...
if ( strchr( letter, entry[i] ) != nullptr ) {
//...
Also it is not a good idea to declare the function like:
void check_letter(string letter, string entry);
You should declare parameters as having referenced types as for example:
void check_letter(string &letter, string *entry);
Or you could add qualifier const if strings are not changed in the function like:
void check_letter( const string &letter, const string *entry);
Maybe it would be even better to use std::string_view instead of std::string as the function parameter type.
letteris always a single letter thenif (entry[i] == letter[0])will work. Basic fact about C++ is that strings and characters are different types.