#include <iostream>
#include <string>
using namespace std;
int main ()
{
string i;
string Hotdog;
string Milkshake;
string Hamburger;
while (i == ( "Hotdog" || "Milkshake" || "Hamburger" ) )
{
cout << "Enter 'Hotdog,' 'Milkshake,' or 'Hamburger.'";
cin >> i;
}
}
I'm sorry. I accidently posted, while I was trying to type.
I'm trying to make a code so that the user must input "Hotdog," "Milkshake," or "Hamburger" to continue, but the compiler says:
error: not match for 'operator==' in 'i == true'
What can I do to fix this?

New Topic/Question
Reply



MultiQuote



|