If function

Why does this not work? I want it to return a text like: Lets play if the request was Play


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

#include <iostream>

using namespace std;

int main()
{
    int sRequest;

    cout << "Do you want to: Dance? Play?";
    cin >> sRequest;

    if (sRequest == Play)
    {
        cout << "Lets play";

    }
        return 0;
}
int sRequest;

What do you think is the meaning of this line?
Also, on line 13, Play has no quotes around it and is therefore not a string, but an undefined object of unknown type and hence a compile error.
Topic archived. No new replies allowed.