no the homework is done, i'm just doing this to put checks on all of my user inputs. purely out of interest.
all i needed to do for homework was to create a 2d array of airplane seats. I just want to know how to run a check on an array with letters in a function.
Really depends. Pay attention to what's inside your array @OP, as alphabet a-z is not the same as A-Z. If you're just checking for validity, what @kemort said would be fine, and all you'd need to do is make that a boolean or something.
As for the code you were trying to do, no it doesn't work because as you might know, characters in C++ are also given numeric integer representations. However, depending on the operating system and the size of the bus (to the best of my knowledge) they are pretty much never going to start at 1. I think most systems use standard ASCII. But anyways, what you wrote is basically:
1 2
if( some character value == the value at the INDEX of the array of the value of the character you input + 1)
// do stuff
In other words, using a standard ASCII table, the value of character 'a' is 97. Do you have 97 slots in your array?