...
The gets()
function was deprecated by Technical Corrigendum 3.
Obsolescent Functions
Wiki Markup |
---|
The following functions are obsolescent and should be avoided in favor of either the portable equivalent or, if available, the more secure alternative defined in \[[ISO/IEC TR 24731-1|AA. References#ISO/IEC TR 24731-1-2007]\] Extensions to the C Library, â Part I: Bounds-checking interfaces. |
Function | Portable Equivalent | Secure Alternative |
---|
asctime() | | asctime_s() |
atof() | strtod() | |
atoi() | strtol() | |
atol() | strtol() | |
atoll() | strtoll() | |
bsearch() | | bsearch_s() |
ctime() | | |
fopen() | | fopen_s() |
fprintf() | | fprintf_s() |
freopen() | | freopen_s() |
fscanf() | | fscanf_s() |
fwprintf() | | fwprintf_s() |
fwscanf() | | fwscanf_s() |
getenv() | | getenv_s() |
gmtime() | | gmtime_s() |
localtime() | | localtime_s() |
mbsrtowcs() | | mbsrtowcs_s() |
mbstowcs() | | mbstowcs_s() |
memcpy() | | memcpy_s() |
memmove() | | memmove_s() |
printf() | | printf_s() |
qsort() | | qsort_s() |
remove() | | |
rename() | | |
rewind() | fseek() | |
setbuf() | vsetbuf() | |
snprintf() | | snprintf_s() |
sprintf() | | sprintf_s() |
sscanf() | | sscanf_s() |
strcat() | | strcat_s() |
strcpy() | stpcpy() | strcpy_s() |
strerror() | strerror_r() | strerror_s() |
strncat() | | strncat_s() |
strncpy() | stpncpy() | strncpy_s() |
strtok() | strtok_r() | strtok_s() |
swprintf() | | swprintf_s() |
swscanf() | | swscanf_s() |
tmpfile() | mkstemp() | tmpfile_s() |
tmpfile_s() | mkstemp() | |
tmpnam() | mkstemp() | tmpnam_s() |
tmpnam_s() | mkstemp() | |
vfprintf() | | vfprintf_s() |
vfscanf() | | vfscanf_s() |
vfwprintf() | | vfwprintf_s() |
vfwscanf() | | vfwscanf_s() |
vprintf() | | vprintf_s() |
vscanf() | | vscanf_s() |
vsnprintf() | | vsnprintf_s() |
vsprintf() | | vsprintf_s() |
vsscanf() | | vsscanf_s() |
vswprintf() | | vswprintf_s() |
vswscanf() | | vswscanf_s() |
vwprintf() | | vwprintf_s() |
vwscanf() | | vwscanf_s() |
wcrtomb() | | wcrtomb() |
wcscat() | | wcscat_s() |
wcscpy() | | wcscpy_s() |
wcsncat() | | wcsncat_s() |
wcsncpy() | | wcsncpy_s() |
wcsrtombs() | | wcsrtombs_s() |
wcstok() | | wcstok_s() |
wcstombs() | | wcstombs_s() |
wctomb() | | wctomb_s() |
wmemcpy() | | wmemcpy_s() |
wmemmove() | | wmemmove_r() |
wprintf() | | wprintf_s() |
wscanf() | | | wscanf_s() |
Noncompliant Code Example
...