Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Deprecated CRT functions and their recommended replacements.
Deprecated POSIX functions
The following POSIX names for functions are deprecated. In most cases, prepending an underscore character gives the standard equivalent name. Note that some functions have more secure versions ("_s" suffix).
You can also eliminate POSIX deprecation warnings by defining _CRT_NONSTDC_NO_DEPRECATE.
Deprecated function |
Replacement function |
---|---|
Security-enhanced functions
The following functions should be avoided because a more secure version of the function should be used instead. For more information, see Security Enhancements in the CRT.
Deprecated function |
Security-enhanced replacement |
---|---|
vsnprintf, _vsnprintf, _vsnprintf_l, _vsnwprintf, _vsnwprintf_l |
vsnprintf_s, _vsnprintf_s, _vsnprintf_s_l, _vsnwprintf_s, _vsnwprintf_s_l |
vsprintf, _vsprintf_l, vswprintf, _vswprintf_l, __vswprintf_l |
|
Functions with Secure Template Overloads
Some of the functions in the preceding section have secure template overloads which can eliminate deprecation warnings by replacing calls to deprecated functions with calls to the new secure versions of those functions. For more information, see Secure Template Overloads.
See Also
Reference
Change History
Date |
History |
Reason |
---|---|---|
October 2008 |
Corrected names of wscanf and wscanf_s. |
Customer feedback. |