Help with my Program

The program I have constructed does not function in the way I want it to.Whenever I get for example to the North answer I go down into the answer choices and It just stops the program and ends it leaving choices out!! Some help with that would be appreciated ..And another question is how can I make this program more user appealing and friendly.... Oh and the program is a game,one of those old typing games.


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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#include <iostream>

using namespace std;
string i;
int main()
{
    //Initial Welcome statement and Question
    cout << "This is CAPS Sensitive so copy your answer the way you see it" << endl;
    cout << "Hello world! Do you wish to continue with your adventure? YES or NO" << endl;

cin >> i;
//this is the yes continuing
 if (i == "YES"){
    cout << "Which Direction do you want to move? NORTH , SOUTH , EAST , or WEST" << endl;
    cin >> i;
    //Here start the options for the last question
    //Start of north
    if (i == "NORTH"){
        cout << " You walk about 30 Miles North and start a campfire.. What will you fuel it with? GASOLINE or TIMBER " << endl;
        cin >> i;
         if (i == "GASOLINE"){
        cout << " The fire explodes flames and catches yourself and your surroundings on fire, You die alive in the fire " << endl;
         }
         else if (i == "TIMBER"){
            cout << "The fire burns beautifully in the sky.... Do you wish to SLEEP or LOOK AT THE STARS" << endl;
            cin >> i;
         } else if (i == "SLEEP"){
        cout << " You sleep peacefully until a pack of wolves come and find you sleeping and eat you " << endl;
       } else if (i == "LOOK AT THE STARS"){
            cout << "you look at the stars until it starts to rain....when you get up to go into the tent you get hit by lightning and die instantly" << endl;}
         }
    }



    //start of south
   if (i == "SOUTH"){
        cout << " You fall in a ditch break a leg and can't crawl out.. Will you SUICIDE or CRAWL OUT?" << endl;
        cin >> i;
         if (i == "SUICIDE"){
        cout << " You have ended your misery " << endl;
       } else if (i == "CRAWL OUT"){
            cout << "A pack of wolves have tracked your scent and finding easy lunch they eat you " << endl;
        }
    }
    //start of west
     else if (i == "WEST"){
        cout << " You come face to face with a bear....do you wish to STRIKE or RUN?" << endl;
        cin >> i;
         if (i == "STRIKE"){
        cout << " You don't hurt the bear in the slightest but with rage the bear rips you to shreds " << endl;
         }
         else if (i == "RUN"){
        cout << " You run for about 10 minutes before you trip and fall down a steep cliff while bash your head against the cliff side and die instantly  " << endl;
          }


    }
    //start of east
    else   if (i == "EAST"){
        cout << " You get lost in the wilderness and can't find your way back after about 5 hours of walking.... Do you wish to keep walking in the same DIRECTION or just GIVE UP " << endl;
    cin >> i;
     if (i == "DIRECTION"){
        cout << " You eventually come upon an abandoned house and see a radio inside and call for help...You get airlifted to the nearest hospital and you live happily ever after " << endl;
        cout << "if you liked it or got annoyed by the endless solutions feedback is welcome!!" << endl;
}
else if (i == "GIVE UP"){
        cout << " You died a lonely death " << endl;
 }
 }
 //This is the NOT Wishing to continue the adventure
else if (i == "NO"){
    cout << "Oh, Well maybe you will play another day... How about that!" << endl;
}
    return 0;
    }

cin stops at the first writespace. Lines 29, 42, 67 you need to use getline.
Thank You for the help now it works how I want it to..
Topic archived. No new replies allowed.