Basically just trying to use == to check for a character
also im an idiot and i skipped a bunch of c++ classes and i have no idea how strings work as far as syntax goes, so any help there would be greatly appreciated
#include <string>
using namespace std;
int main(void)
{
    string letter;
    int number;
    letter = ' ';
    cout << "Please enter any ASCII letter" << endl;
    cin >> letter;
    if (letter == 'e')                       //Error is here
        {
            number = 1;
            cout << number << endl;
        }
    return 0;
}
I want to have the program check the letter and assign a number accordingly. I just made this simple script to test it, but I get error: no match for 'operator==' in 'letter == 'e''
 
     
     
    