home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / linux / 22304 < prev    next >
Encoding:
Text File  |  1992-12-31  |  1.3 KB  |  37 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!spool.mu.edu!uwm.edu!ux1.cso.uiuc.edu!news.cso.uiuc.edu!uxa.cso.uiuc.edu!dld54032
  3. From: dld54032@uxa.cso.uiuc.edu (Dave Dribin)
  4. Subject: "the `gets' function is unreliable and should not be used"??!!!
  5. Message-ID: <C058sJ.Fuu@news.cso.uiuc.edu>
  6. Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
  7. Organization: University of Illinois at Urbana
  8. Date: Thu, 31 Dec 1992 21:53:06 GMT
  9. Lines: 26
  10.  
  11. I was trying to compile some programs that I had written for class on
  12. a Sun Sparc and compile using gcc, and I kept getting this error that
  13. the `gets' function is unreliable.  How can it be unreliable!  It won't
  14. even work with this simple program:
  15. #include <stdio.h>
  16.  
  17. main() {
  18.     char str[256];
  19.  
  20.     gets(str);
  21.     puts(str);
  22.  
  23.     return(0);
  24. }
  25.  
  26. I am using SLS Linux v99.0.  Did I install anything wrong, or is the function
  27. really unreliable.  I would think that all the standard ASNI functions would
  28. be reliable!  Thanx in andvance, and happy new year...
  29.  
  30. Dave
  31.  
  32. -- 
  33. Dave "Dribs" Dribin         |"No you don't!  You can't take it from me now!
  34. dribs@uiuc.edu              | I've had this ice cream bar since I was a
  35. "Happy, Happy!! Joy, Joy!!" | child... People... Always trying to take it
  36.                             | from me... Why don't they leave me ALONE?!!!"
  37.