Having a Strange Issue in C++ : <p>I'm very, very new to coding. 
Thought I'd start with C++, which I've been writing for about 3 days. 
In order to teach myself, I've been using a mix of Sololearn, Hackerrank and writing a Text-Based Adventure Game. </p>

<p>Herein lies my issue.</p>

<p>I'm in the process of writing start-scenarios for the 3 playables in my project. 
These are within separate if statements, with any decisions within those being nested if statements. 
To include character health, all of this is within a single while loop, which is true while Health >= 1. </p>

<p>However, 
I'm having a strange issue where, when selecting one of the 'options' (nested if statements below 'Orc'), when ran, it outputs more than one option, then repeats all text from character creation, up to that point, once.</p>

<p>This only happens when the if statement is a string. 
If I change the code so that there is no string for "Item", and set "Bucket", "Rug", and "Bars" as int 1,2,3, it works as I would expect it to. 
Is this an issue with strings in C++?</p>

<p>I have researched everything I can think of, including usung getline instead of cin for numerous cin statements, in case that was causing the issue, and yet no joy. </p>

<p>Please find my code below. Have I missed something?
Also, being almost completely new to this, is there a better way in which I could do this? </p>

<p>Finally, please note that only the 'Orc' segment works correctly if you feel the need to run it to get a better idea of the issue that I'm having - 'Human' and 'Elf' currently create infinite loops because I haven't written far enough into them to break the while loop yet. </p>

<p>Thanks in advance for your help!</p>

<pre><code>#include "stdafx.h"
#include &lt;iostream&gt;
#include &lt;string&gt;

using namespace std;


int main()
{
//Name Entry
string Name;
cout &lt;&lt; "Enter Name: " &lt;&lt; endl;
getline (cin, Name);

//Age Entry
int Age;
cout &lt;&lt; "Enter Age: " &lt;&lt; endl;
cin &gt;&gt; Age;

//Race Entry
string Race;
cout &lt;&lt; "Enter Race: " &lt;&lt; endl;
cin.ignore();
getline (cin, Race);

//Stats
int Strength;
int Agility;
int Speech;
int Intellect;
int Social;
int Health=1;

//Racial Starts
while (Health &gt;= 1) {

    //Human
    if (Race == "Human" || Race == "human") {

        Strength = 10;
        Agility = 10;
        Speech = 8;
        Intellect = 7;
        Social = 20;
        Health = 100;

        cout &lt;&lt; "Human Selected." &lt;&lt; endl;
        cout &lt;&lt; "Starting Game!" &lt;&lt; endl &lt;&lt; endl;
        cout &lt;&lt; "You are in a finely furnished bedroom." &lt;&lt; endl;}

    //Elf
    if (Race == "Elf" || Race == "elf") {

        Strength = 8;
        Agility = 14;
        Speech = 12;
        Intellect = 13;
        Social = 10;
        Health = 80;

        cout &lt;&lt; "Elf Selected." &lt;&lt; endl;
        cout &lt;&lt; "Starting Game!" &lt;&lt; endl &lt;&lt; endl;
        cout &lt;&lt; "You are cleaning a finely furnished bedroom." &lt;&lt;endl;}

    //Orc
    if (Race == "Orc" || Race == "orc") {

        Strength = 18;
        Agility = 5;
        Speech = 6;
        Intellect = 3;
        Social = 5;
        Health = 200;

        cout &lt;&lt; "Orc Selected" &lt;&lt; endl;
        cout &lt;&lt; "Starting Game!" &lt;&lt; endl &lt;&lt; endl;
        cout &lt;&lt; "You are locked in a cell." &lt;&lt; endl &lt;&lt; "The cell is made up of three stone walls." &lt;&lt; endl &lt;&lt; "There are no windows." &lt;&lt; endl;
        cout &lt;&lt; "There is a rug on the cobbled stone floor, and a bucket in the corner." &lt;&lt; endl &lt;&lt; "Iron bars face into a guard's chamber." &lt;&lt; endl &lt;&lt; endl;
        cout &lt;&lt; "The guard is sleeping." &lt;&lt; endl &lt;&lt; "A shortsword rests in a scabbard on the table in fromt of him." &lt;&lt; endl;

        //Actions in this room
        int Item;
        cout &lt;&lt; "Your escape lies with either the Bucket, the Rug or the Bars." &lt;&lt; endl &lt;&lt; "Pick an item." &lt;&lt; endl;

        string Item;
        cin &gt;&gt; Item;


        if (Item == "bucket" || Item == "Bucket") {
            cout &lt;&lt; "You place the Bucket on your head." &lt;&lt; endl &lt;&lt; "The bucket is full of your own excrement." &lt;&lt; endl &lt;&lt; "You die of disease." &lt;&lt; endl;
            Health = Health-1000; }

        if (Item == "Rug" || Item == "rug") {
            cout &lt;&lt; "You lie on the rug and fall asleep." &lt;&lt; endl &lt;&lt; "The guard wakes up." &lt;&lt; endl &lt;&lt; "His irrational hatred for you causes him to draw his sword, enter your cell and sever your head." &lt;&lt; endl;
            Health = Health-1000; }

        if (Item == "Bars" || Item == "bars") {
            cout &lt;&lt; "You try the bars." &lt;&lt; endl &lt;&lt; "You realise that this cell was not built to hold an Orc." &lt;&lt; endl &lt;&lt; "You bend the bars easily and step out of the cell." &lt;&lt; endl; }





    }





}

cout &lt;&lt; "Game Over";

system("pause");
return 0;
}
</code></pre>
