no match for 'operator==' in 'weapon == 1734829426'|

Whats that mean, and how do I fix it? Here is my code, I'm trying to make a basic text based game.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <iostream>
#include <string>

using namespace std;

int main()
{
    cout << "Please enter your name" << endl;
    string name;
    cin >> name;
    cout << "Hello, " << name << endl;
    cout << "Please select your race \n 1.Human\n 2. Elf\n 3.Dwarf\n 4.Ogre\n enter 1, 2, 3, 4 for your choice";
    int race;
    cin >> race;
    if (race == 1)
    {
        cout << "Hello, " << name << "You selected choice number " << race << "so you are a human\n";
        cout << "The weapons available to the level one human are: Dagger, Sword, Bow, and Throwing Daggers\n";
        cout << "Type stats to see the stats for each weapon\n";
        cout << "Or type the weapon you want to choose";
        string weapon;
        cin >> weapon;

        if (weapon == 'Dagger')
        {
            cout << "Hello, " << name << "you are a human,\n Level 1\n Weapon:\n Dagger \n Level: \n 1\n ";
        }
    }
}
Dagger is a string, not a single character. it must be between double quotes like in you cout lines
Topic archived. No new replies allowed.