I want to validate if a char is actually a char. When user inputs a string of letters "abc" program will say that user must enter a single char.
I was thinking about using
if(sizeof(userLetter != 1))
cout << "Enter only a single letter."
If your reading a char, it will only read one and keep the following chars in the buffer.
If you want to take all what the user types until he presses the first enter, you need to get a line:
string line; while (getline(cin, line) && (line.length()==0 || line.length()>1) ) cout << "Enter only a single letter..."<<endl;
When this ends successfuly, get the first char of string with
userLetter = line;