OK, this is probably a really stupid question but why doesn't gets() work in OS X? I'm new to programming and I'm currently working through the "C for Dummies" book as a start, and this is the first function that I can't get to work. The program compiles fine, but when I run it from the command line it ignores the gets() function and prints "warning: this program uses gets(), which is unsafe" instead.
So...
- why is it unsafe?
- is there to get it to work
- should I be using gets() at all?
Thanks