+ 1
Why gets donot work in sololearn
I am learning c whenever I use gets function it gives me a error.
2 Respostas
+ 2
That's because gets() is not a standard function and has been removed from C/C++ latest standards because of its dangerous behaviour of overflowing the buffer.
You should use fgets() as an alternative
Learn more about fgets () here👇
https://www.educative.io/edpresso/how-to-use-the-fgets-function-in-c
+ 2
gets() has been removed from the latest version of c standard .Sololearn in based on c latest compiler.
You can use this get a string with gaps:
scanf ("%[^\n]%*c", string);