We recommend using Visual Studio 2017

Type Checking (CRT)


The latest version of this topic can be found at Type Checking (CRT).

The compiler performs limited type checking on functions that can take a variable number of arguments, as follows:

Function callType-checked arguments
_cprintf_s, _cscanf_s, printf_s, scanf_sFirst argument (format string)
fprintf_s, fscanf_s, sprintf_s, sscanf_sFirst two arguments (file or buffer and format string)
_snprintf_sFirst three arguments (file or buffer, count, and format string)
_openFirst two arguments (path and _open flag)
_sopen_sFirst three arguments (path, _open flag, and sharing mode)
_execl, _execle, _execlp, _execlpeFirst two arguments (path and first argument pointer)
_spawnl, _spawnle, _spawnlp, _spawnlpeFirst three arguments (mode flag, path, and first argument pointer)

The compiler performs the same limited type checking on the wide-character counterparts of these functions.

CRT Library Features