home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 4631 < prev    next >
Encoding:
Text File  |  1996-08-05  |  801 b   |  42 lines

  1. Path: familynews.cycor.ca!usenet
  2. From: gcaine@cycor.ca (gcaine)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: simple K&R ANSI-C examples won't compile under SAS/C
  5. Date: 2 Mar 1996 13:50:31 GMT
  6. Organization: Cycor Communications Inc., Coast to Coast Internet Services
  7. Message-ID: <359.6634T885T1317@cycor.ca>
  8. References: <68771782@0humpty.tomate.tng.oche.de>
  9. NNTP-Posting-Host: skt-as011.cycor.ca
  10. X-Newsreader: THOR 2.22 (Amiga;TCP/IP)
  11.  
  12.  
  13. >    Hi,
  14.  
  15. >this little example form the 'Kernighan&Ritchie' won't compile:
  16.  
  17. >#include <stdio.h>
  18. >#include <clib/alib_stdio_protos.h>
  19.  
  20. >main()
  21. >{
  22. >    int c;
  23.  
  24. >     while((c = GetChar()) !=EOF)
  25. >    PutChar(c);
  26. >}
  27.  
  28. Try this:
  29.  
  30. #include <stdio.h>
  31.  
  32. main()
  33. {
  34.     int c;
  35.     
  36.     while ((c = getchar()) != EOF)
  37.         putchar(c);
  38. }
  39.  
  40. Gary Caine    Member: Team AMIGA
  41.  
  42.