+ 5
Related to string
Why Sololearn's Compiler didn't support gets function in string ???
4 ответов
+ 3
It works but it gives warning what may happen with using gets. Warning comes into reality when your input causing overflowing charecters and unexpected output comes.
All these because, gets is not from standard c documention...
Edit: hence not recommended to use.
+ 2
It would be nice if you can probably share an example and explain the problem.
+ 1
"gets" does work, but you get some ugly warning messages. You need to use "fgets":-
http://www.cplusplus.com/reference/cstdio/fgets/
0
There is quite a good reason why `gets` is no longer recommended. Searched the net for "gets is deprecated" and found these two of on the top results
https://bytes.com/topic/c/answers/737528-why-usage-gets-dangerous
https://stackoverflow.com/questions/1694036/why-is-the-gets-function-so-dangerous-that-it-should-not-be-used