I was experimenting and unfortunately it didn't work. I tried using enumerations and if statements with else clauses. I only want to use these things because I want to expand my knowledge of enumerators because I don't really understand them. There is an explanation of what I wanted the code to do if you don't understand my code.
if (choice = EASY)
{
cout << "You have chosen EASY!";
}
else if (choice = MEDIUM)
{
cout << "You have chosen MEDIUM!";
}
else if (choice = HARD)
{
cout << "You have chosen HARD!";
}
else
{
cout << "Cant choose that.";
}
system("\n\n\npause");
return 0;
}
That is my code. What I wanted it to do was to make the player of some video game choose what difficulty they wanted. With the difficulties, I did not know whether the player should have typed i a number to choose their difficulty or the actual name of the difficulty. (Second one sounded like the one I should have done...)
Thank you Athar, that fixed the problem. I have one question though. How come i had to use two equal signs? I usually use 1 and my program woulr run fine...