+ 2
why this error comes when I compile this gets() statement in C?
2 Respuestas
+ 2
gets() function dangerous and shouldn'n be used.a safer alternative to gets() is fgets(), which reads up to a specified number of characters. This approach helps prevent a buffer overflow, which happens when the string array isn't big enough for the typed text
for exemple ::
fgets(buffer, 224, stdin);
BigUp☆