Code:
if (FamAnsw == Answ)
{
cout << "CORREECTT!!!/n";
cout << "[Applause] [Bells] [Whistles] [explosions]/n";
else
cout << "ERRR! Wrong! Sry play again!/n";
}
Just move the ending
} up above teh else clause, since that tells where the if scope ends, and since the else is encapsulated in it, the compiler dosn't know when to use the else scope, so the code will be:
Code:
if (FamAnsw == Answ)
{
cout << "CORREECTT!!!/n";
cout << "[Applause] [Bells] [Whistles] [explosions]/n";
}
else
cout << "ERRR! Wrong! Sry play again!/n";
You might want to change
FamAnsw and
Answ to type
std::string, since you can't store an entire string in a char. It has to either be a char* or a string, and when using char* you need to know how much memory it will take, where string will dynamicaly allocate teh memory needed, it is easier to use, pluss it has a buildin
== operator, where char* dosnt, so you'd have to use strcmp() on that.
Oh, and your line ending, with
/n should be
\n, or
std::endl, aswell with your
/t it should be
\t if you were trying to make a <tab> space.