I'm having problems with strings and an "if" statement, here is an example code, please help me if you can. Thank you.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#include <iostream>
usingnamespace std;
int main()
{
string CLASS_CHOICE;
cout << "Which class would you like to be? Archer, Knight, or Sorcerer?: "
cin >> CLASS_CHOICE;
if (CLASS_CHOICE == 'Archer')
{
//statement
}
return 0;
}
The problem I am having is the if statement...it says too many characters in character constant.