When I try to use the gest() function in C. I always get a warning "gets is invalid in C99"
When I try to use the gets() function in C. I always get a warning "gets is invalid in C99"
Does anyone know why this is happening? Also how to fix the problem so I can use the function without any warnings?
The function works in this code but in other codes it doesn't work correctly
from what I'm getting from
gets was removed from the standard library and this error message was a notification for those with this in their legacy code to remove it
so it depends how old the compiler you're using is
you should use
fscanf(file pointer, format string, argument1, argument2...) as a substitute