Huh??
Code:
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <string>
using namespace std;
int main(int nNumberofArgs, char* pszArgs[])
{
string Fam;
string FamAnsw;
string Answ("Franz Ferdinand");
cout << "\tWelcome To Family Fued George style\n";
cout << "Your host George Tuosto! [applause]\n";
cout << "Our family today is...\n";
cout << "Enter your name here: ";
getline(cin, Fam);
cout << "The " << Fam << " family!\n";
cout << "Here is your first question... ";
cout << "... Who was assassinated in 1914 that started WW1?\n";
cout << "Answer: ";
getline(cin, FamAnsw);
if (FamAnsw == Answ)
{
cout << "CORREECTT!!!\n";
cout << "[Applause] [Bells] [Whistles] [explosions]\n";
}
else
cout << "ERRR! Wrong! Sry play again!\n";
cout << "Thats it for todays show of Family Fued George style!\n";
return 0;
}
Quote:
bouncer@smaug{118} ~> g++ -Wall -o fab test.cpp
bouncer@smaug{119} ~> ./fab
Welcome To Family Fued George style
Your host George Tuosto! [applause]
Our family today is...
Enter your name here: Ib
The Ib family!
Here is your first question... ... Who was assassinated in 1914 that started WW1?
Answer: Franz Ferdinand
CORREECTT!!!
[Applause] [Bells] [Whistles] [explosions]
Thats it for todays show of Family Fued George style!
bouncer@smaug{120} ~>
|
Seems to me theres no error n it, altho I had to change the
cin >> in order to catch anyone placing a <space> in the input.