Simple Code Problem

Write your question here.
I Need To Know What Can Be Done To Fix My Code It Shows Only "error iso c++ forbids comparison between pointer and integer -fpermissive"


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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
  Put the code you need help with here.
#include<iostream>
using namespace std;
int main()
{
	cout<<"Hello, for this game you MUST write in the frorm written meaning Same Capitals, Same Lettering Same Way for it to be read."<<endl;
	cout<<"Your Simulation Is:"<<endl;
	cout<<"In The Blink Of An Eye Your Life Changes When As A Celebration Of '150 Years Of True (North) Korea' The U.S Gifts Them A Nuclear Bomb"<<endl;
	cout<<"Now You Live In A Bunker All Alone With An Inventory Of: "<<endl;
	cout<<"- Food (Running Out)"<<endl;
	cout<<"- Water [(Very Little)(Only ~4 Days)]"<<endl;
	cout<<"- Batteries"<<endl;
	cout<<"- Flashlight (Batteries Included)"<<endl;
	cout<<"- Your Wit"<<endl;
	cout<<"- Book On Space Jesus"<<endl;
	cout<<"- Gun (6 Bullets)"<<endl;
	cout<<"--------------------------------------------------------------------------"<<endl;
	int i;
	int answer1;
	int answer2;
    cout<<"Please Enter Your Goverment Given Designated NUMBER: ";
    cin >> i;
    cout<<"Welcome " << i<<endl;
    cout<<"You begin the day by walking to the traders market for some food in exchange for your Space Jesus Book."<<endl;
    cout<<"You Then See A Box named 'leg1t cur3 4 apoc'. Do You:"<<endl;
    cout<<"- Box"<<endl;
    cout<<"- Market"<<endl;
    cin>>answer1;
    if(answer1=="Box")
	{cout<<"You Go Near The Box And Get Shot By A 12 Year Old";
	return 0;}
	else if(answer1=="Market")
	{cout<<"You Go To The Market And Get Food";
	cout<<"While Going Back you see a man stealing a dead man's things Do You:"<<endl;
	cout<<"- Kill Him And Take Both Their Things"<<endl;
	cout<<"- Run Back Home"<<endl;}
	cin>>answer2;
	if(answer2=="Kill Him And Take Both There Things")
	{cout<<"You Kill Him And Get"<<endl;
	cout<<"- Rifle"<<endl;
	cout<<"- Bullets"<<endl;
	cout<<"- Food"<<endl;
	cout<<"- Water"<<endl;
	cout<<"- A Bullet In The Skull From His Group"<<endl;}
	else if(answer2=="Run Back Home")
	{cout<<"You Reach Home Safely";}
}

1
2
int answer1;
if(answer1=="Box")

How can a number be equal to string?
Topic archived. No new replies allowed.