Says no operator "==" matches these operands

#include <iostream>
#include <string>
#include <cstdlib>
#include <time.h>
#include <windows.h>

using namespace std;
int main()
{
int x;
std::string Cat;
x=45,000;

cout << "Welcome to your Sword shop This is nick speaking\n";
Sleep(2500);
cout << "You have " << x << " Gold in your bank\n";
cout << "Would you like to purchase a sword?\n";

cin >> Cat;

if(Cat == 'Yes')
{

}

}
1
2
// if(Cat == 'Yes')
if( Cat == "Yes" )
Topic archived. No new replies allowed.