Because cin == char doesn't make sense, since cin is an object of a class, and char is a type. How would the compiler even begin to compare the two?
To check whether or not a user entered a character, your best bet would be to use the isalpha() function. This function returns a Boolean expression indicating whether or not the character you gave it is within the alphabet. For instance:
I'm having a hard time understanding what you're trying to accomplish. Why did you change igen to a character? Framework was telling you to use the input variable as a character, not your test variable.
Aside from the information framework offered, there is a way to use integers to make sure the user doesn't enter a character and crash the standard input stream (wreaks havoc on while loops). Simply test the flags set by the input stream. If the user enters something out of bounds (enters a character when asking for a number), it sets a failbit flag. You can check the flag during each loop (make sure they didn't enter a number), clear the flag, and try again (typically used with continue).
// This macro simply checks a single character to see if it's
// a 0, 1, 2, 3, ..., or 9.
#define is_number(a) (((a) >= '0') && ((a) <= '9'))
bool input_is_number(constchar *str)
// While the character pointed-to by 'str' is not a
// ...check if the current character is a number. If it's
// not, then it's not a number; return false.
// Otherwise, move onto the next character.
// All of the characters were digits, so it's obviously
// a number.
// Get a string from the user.
std::cin >> input;
// Is it a number?
std::cout << "Error: That's not a number\n";
else std::cout << "Well Done!\n";
"Now I just have to figure it out, what it is and how to explain it to my self. =)
Unless I missed something, I believe the OP was trying to have the user enter a string for the DVD titles and then respond to a Yes or No question to determine if the program should continue or not. I don't believe you code, albeit good, applies to the OP's situation.
I was going to head down the road of checking the input stream to make sure the user didn't enter a character when you were asking for a number, but I see that you're not technically asking for a number, but a 1 or 0 for true or false. The issue that goes into handling that isn't necessarily worth all of the extra code, especially for such a simple program. Frameworks example is actually really good, and saves from having to use a separate header file. You can modify it to fit your program accordingly and just tell the user to enter -1 or something for the string and have that terminate your loop.
The beauty of C++, one desired outcome, infinite possible ways to get there.