OpenAmiga (160/964)

From:Patrick Roberts
Date:7 Sep 2000 at 10:59:24
Subject:Re: AMIOPEN: [Q] gets and puts

Make sure you fflush(stdout) and fflush(stdin). On many (most) systems
a \n automacitally flushes but not on Elate.

-Pat

John Niclasen wrote:
>
> Greetings!
>
> I was happy to get my d'Amiga from KDH 2 weeks ago. I installed the SDK
> and was up and running in a short time. I have assembled and C-compiled
> some of the examples, have done some reading in the manual and am about
> to port some utilities.
>
> I'm having a problem with either gets or puts it seems. The following
> C-program won't run correctly:
>
> #include <stdio.h>
>
> int main(int argc, char **argv)
> {
> char str[256];
>
> printf("Enter string: ");
> gets(str);
> puts(str);
>
> return 0;
> }
>
> Is the functions gets and/or puts broken or did I miss something?
>
> Thanks in advance
> John Niclasen
> Denmark.
> Subscribe/Unsubscribe: open-request@amiga.com
> Amiga FAQ: http://www.amiga.com/faq.html
Subscribe/Unsubscribe: open-request@amiga.com
Amiga FAQ: http://www.amiga.com/faq.html