So basically I'm learning C and they taught us to use the gets() function, which I found that it was removed and cannot be used anymore. So I'm trying to learn to use the alternative, the gets_s() function, but I can't seem to. For example the following code gives me "Undefined reference to gets_s" when attempting to compile.:
char line[21];
gets_s( line, 20 );
printf( "The line entered was: %s\n", line );
A lot of people have said to use fgets() instead of gets() but I don't understand how that will work, since I want to read the user's input, not from a file.