On 2002-05-23 22:38, echo dev wrote:
> Now the problem is when the player answers it correctly it ouputs
> would you like to play again.. When it prompts for your answer it
> automaicly acwers it self.

> scanf("%c", &qNa);
> printf("WOULD YOU LIKE TO PLAY AGAIN?(y/n)>");
> scanf("%c", &qNa);

Just don't use scanf().  Read a line of text and parse it on your own.
Something like:

        #define BUFLEN  512

        char buf[BUFLEN];

        if (fgets(buf, BUFLEN, stdin) == NULL) {
                if (ferror(stdin))
                        /* Handle errors. */
                        ;
                else if (feof(stdin))
                        /* End of file, quit or something. */
                        ;
        }

-- 
Giorgos Keramidas    - http://www.FreeBSD.org
[EMAIL PROTECTED] - The Power to Serve

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to