"i"
is not a character, it's a character array that basically decays to a pointer to the first element.
You almost certainly want 'i'
.
Alternatively, you may actually want a lookup based on more than a single character, in which case you should be using "i"
but the type in that case is const char *
rather than just char
, both when defining c
and in the base::lookup()
method.
However, if that were the case, I'd give serious thought to using the C++ std::string
type rather than const char *
. It may not be necessary, but using C++ strings may make your life a lot easier, depending on how much you want to manipulate the actual values.