How to compare a string as a variable to an another variable string? : <p>So, I want to get an answer from the user (Yes or No), and if it's yes do someting, and if no, do something else.</p>

<p>I'm using c++ (with Code::Blocks), and I'm a beginner at programming.
This is what I managed to do:</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;cstdlib&gt;
using namespace std;

int main()
{
char answer;
answer = 1;
int x;
x = 1;
int number1;
while ( x &gt; 0 )
{  //Ez egy köszönés!
cout&lt;&lt;"Type in a number!\n";
 //Kérek egy számot
cin&gt;&gt; number1;
  cin.ignore();
 //Kiírom a számot
  cout&lt;&lt;"You entered: "&lt;&lt; number1 &lt;&lt;"\n";
if ( number1 == 666 )  //Ha number1 = 666 akkor kiírjuk hogy Are you the Devil?
{
    cout&lt;&lt;"Are you the Devil?\n";
    x = 0;
}
if ( number1 != 666 )
{
if ( number1 &gt; 5 ) //Ha number1 nagyobb 5nél kiírjuk hogy Great Job!
{
      cout&lt;&lt;"Great job!\n";
}
if ( number1 &lt; 5  )  //Ha number1 kisebb 5nél kiírjuk hogy Good Job!
{
      cout&lt;&lt;"Good job!\n";
}
if ( number1 == 5 )  //Ha number1 = 5 akkor kiírjuk hogy Thank you
{
    cout&lt;&lt;"Thank You\n";
}
}

cout&lt;&lt;"\n"; //sortörés
}
cin&gt;&gt; answer;
if ( answer == 1 )
{
    cout&lt;&lt;"OH GOD,NO!";
}
}
</code></pre>

<p>It suposed to ask for a number, if you give it one if it's less tan 5 it would say:Good Job!, if more Great Job!, if 5 Thank you, and do it in a loop.
And if you type in 666 it would ask if you're devil.and here I want to get an input from the user, Yes or No. if No then it would say: OH GOD,NO, if Yes, well I didn't got there yet...</p>
