Hi people,
when starting many of us were warn not to use gets() function. We know it's unsafe and it might easily crah program. On many boards there is FAQ in which there are advices not to use gets(). I wonder why such function exist in standard library and why is it written in the first place.
What is actual use of gets() exept that many of us use it in school for quick and dirty user input?
Why is it there? I assume because of historical reasons, but which reasons that is real question.
Thanks
Recommended Answers
Jump to Post>but its has its own merits...
There are no merits to gets.>say, the ease of accepting strings...
I've argued this point with authors before (Dan Gookin is one such example), and have yet to hear a sufficiently good explanation of howfgets(s, n, stdin)
is so hard that …
All 4 Replies
Dave Sinkula
2,398
long time no c
Team Colleague
Micko
2
Junior Poster
Ginna Yadav
0
Newbie Poster
Narue
5,707
Bad Cop
Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.