How to use strings in if statements in c++?
<p>The problem with this code is that there are no errors showing, but when i compile the program, the if else statements do not carry out as they should do. Both if statements show the same answer, for example the second if statement. If I type Y or N then I get the same thing, 'You will now choose an event'. How do i get rid of this problem? Is char supposed to be used or string? </p>

<pre><code>#include &lt;iostream&gt;
#include &lt;iomanip&gt;
#include&lt;stdlib.h&gt;
class start
{
public :
    void getusertype ();
    void registeruser ();
    start(); 
protected :
    char consumer_name[20],
    consumer_address[30],
    consumer_email[30];
    char user[8];
};

start::start()
{
    char terminator;
    cout &lt;&lt;"Are you the venue manager, consumer or ticket agent?";
    cin.get(user,8);
    cin.get(terminator);

}
void start::getusertype ()
{
    char terminator;
    if(user[8])
    {
        cout &lt;&lt;"You have now entered the system." &lt;&lt;endl &lt;&lt;endl;
        cin.get(terminator);

    }
    else
    {
        cout &lt;&lt;"You can only enter this part of the system if you are a consumer.";
    }

    }
void start::registeruser()
{
    char option[1];
    cout &lt;&lt;"Are you registered? (Enter Y/N)";
    cin.get(option,1);
    if (option=="N")
    { char terminator;
        cout &lt;&lt;"Please enter your registration details" &lt;&lt;endl &lt;&lt;endl;
        cout &lt;&lt; " Enter your full name: " &lt;&lt;endl;
        cin.get (consumer_name,20);
        cin.get(terminator);
        cout &lt;&lt;"Enter your address: " &lt;&lt;endl;
        cin.get(consumer_address,30);
        cin.get(terminator);
        cout &lt;&lt;"Enter your email address: " &lt;&lt;endl;
        cin.get(consumer_email,30);
        cin.get(terminator);
    }
    else
    {
        cout &lt;&lt;"You will now choose an event.";
    }
}
</code></pre>
