Parse error in code: expected ' ; ' before ' { ' token -- what is causing this?
<p>The error I'm getting is <code>error: expected ' ; ' before ' { ' token</code></p>

<p>I tried fixing the code by adding <code>;</code> after <code>if (thisisanumber==5)</code> as well as after <code>else (thisisanumber!=5)</code>. While this solves the first error it creates another error that says <code>error: ' else ' without a previous ' if '</code>. I'd really love to know what error I've made in writing the code, thanks.</p>

<p>Here is my code:</p>

<pre><code>#include &lt;iostream&gt;

using namespace std;

int main()
{
    int thisisanumber;

    cout&lt;&lt;"Whats the Password?: ";
    cin&gt;&gt; thisisanumber;
    cin.ignore();
    if (thisisanumber==5) {
        cout&lt;&lt;"You've discovered the password! Wow, you're a genious you should be proud./n";
        }
    else (thisisanumber!=5) {
        cout&lt;&lt;"You've failed in knowing the password and therefore cannot enter, leave and do not come back. Goodbye!/n";
        }
    cin.get();
}
</code></pre>
