View Single Post
Old 07-19-2005, 12:43 AM   #4 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,710
redhead is on a distinguished road
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.
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote