I have faced a compiler error(c3861) in my newly installed Visual studio community 2015 IDE:
I just want to use gets() function from stdio.h library, and i have included stdio.h
file in my program, but compiler show me a compiler error
like below:
error C3861: 'gets': identifier not found
What should i do to compile my program correctly withgets()
function.
if you are looking forward to learn
about
buffer overflow vulnerability
you simply can use it and anther unsafe functions by the fallowing steps
Compile As
value to Compile as C Code (/TC)
disable specific warning
Since C11, gets
is replaced by gets_s
. The gets() function does not perform bounds checking, therefore this function is extremely vulnerable to buffer-overflows. The recommended replacements are gets_s()
or fgets()
gets_s(buf);
fgets(buf, sizeof(buf), stdin);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With