Ok, I spent 2 days on this problem...for my RPG, when the user chooses a profession, nothing happens, I just get this error:
C:\Program Files\Microsoft Visual Studio\My Projects\RPG2k\main.cpp(54) : error C2679: binary '<' : no operator defined which takes a right-hand operand of type 'const int' (or there is no acceptable conversion)
here's what I do for the prof choice:
Code:
void begin()
{
user.proftype == 0;
system("cls");
pcol();
cout << "What is your name?\n";
cin >> user.name;
cout << "Thank you "<<user.name<<". Please choose a class:\n\n";
cout << "Please Choose Your Class Type:\n"
"1] Thief\n"
"2] Cleric\n"
"3] Mage\n"
"4] Warrior\n";
cin >> user.proftype;
while(user.proftype < 1 || user.proftype > 4) // <-- error line
{
//uses switch statments which are not posted in code here
}
}
I am just wondering if someone knows the answer to this. I have tried for 2 days trying to fix it. Or if anyone knows of a better way of doing this.