Here's my code :
.
.
void do_again()
{
char yn[4];
cout<<"Would you like to play the Facto Game?
";
cout<<"Please enter yes or no and press enter.
";
do
{
cin.get (yn, 4);
cin.ignore(80, '
');
if (strcmp(yn, "yes")==0)
{
info();
}
if (strcmp(yn, "no")==0)
{
cout<<"Goodbye!
";
break;
}
if ((yn !='no)||(yn!='yes))
{
cout<<"Error
";
do_again();
}
.
.
.
(Edited by raptor1 at 2:55 pm on May 17, 2001)
(Edited by raptor1 at 3:01 pm on May 17, 2001)
(Edited by raptor1 at 3:02 pm on May 17, 2001)

New Topic/Question
Reply




MultiQuote




|