diff --git a/docs/c-runtime-library/reference/vcprintf-p-vcprintf-p-l-vcwprintf-p-vcwprintf-p-l.md b/docs/c-runtime-library/reference/vcprintf-p-vcprintf-p-l-vcwprintf-p-vcwprintf-p-l.md index 9910375760..04735adbee 100644 --- a/docs/c-runtime-library/reference/vcprintf-p-vcprintf-p-l-vcwprintf-p-vcwprintf-p-l.md +++ b/docs/c-runtime-library/reference/vcprintf-p-vcprintf-p-l-vcwprintf-p-vcwprintf-p-l.md @@ -62,7 +62,7 @@ Each of these functions takes a pointer to an argument list, and then uses the ` The versions of these functions that have the `_l` suffix are identical except that they use the locale parameter that's passed in instead of the current locale. -Each *`argument`* (if any) is converted and is output according to the corresponding format specification in *`format`*. The format specification supports positional parameters so that you can specify the order in which the arguments are used in the format string. For more information, see [printf_p Positional Parameters](../printf-p-positional-parameters.md). +Each *`argument`* (if any) is converted and is output according to the corresponding format specification in *`format`*. The format specification supports positional parameters so that you can specify the order in which the arguments are used in the format string. For more information, see [`printf_p` positional parameters](../printf-p-positional-parameters.md). These functions don't translate line-feed characters on output into carriage return-line feed (CR-LF) combinations. @@ -73,7 +73,7 @@ These functions validate the input pointer and the format string. If *`format`* ### Generic-text routine mappings -| Tchar.h routine | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined | +| `Tchar.h` routine | `_UNICODE` and `_MBCS` not defined | `_MBCS` defined | `_UNICODE` defined | |---|---|---|---| | `_vtcprintf_p` | **`_vcprintf_p`** | **`_vcprintf_p`** | **`_vcwprintf_p`** | | `_vtcprintf_p_l` | **`_vcprintf_p_l`** | **`_vcprintf_p_l`** | **`_vcwprintf_p_l`** | @@ -82,8 +82,8 @@ These functions validate the input pointer and the format string. If *`format`* | Routine | Required header | |---|---| -| **`_vcprintf_p`**, **`_vcprintf_p_l`** | \ and \ | -| **`_vcwprintf_p`**, **`_vcwprintf_p_l`** | \ and \ | +| **`_vcprintf_p`**, **`_vcprintf_p_l`** | `` and `` | +| **`_vcwprintf_p`**, **`_vcwprintf_p_l`** | `` and `` | For more compatibility information, see [Compatibility](../compatibility.md). @@ -101,18 +101,18 @@ For more compatibility information, see [Compatibility](../compatibility.md). // An error formatting function that's used to print to the console. int eprintf(const char* format, ...) { - va_list args; - va_start(args, format); - int result = _vcprintf_p(format, args); - va_end(args); - return result; + va_list args; + va_start(args, format); + int result = _vcprintf_p(format, args); + va_end(args); + return result; } int main() { - int n = eprintf("parameter 2 = %2$d; parameter 1 = %1$s\r\n", - "one", 222); - _cprintf_s("%d characters printed\r\n"); + int n = eprintf("parameter 2 = %2$d; parameter 1 = %1$s\r\n", + "one", 222); + _cprintf_s("%d characters printed\r\n", n); } ``` @@ -126,4 +126,4 @@ parameter 2 = 222; parameter 1 = one [Console and port I/O](../console-and-port-i-o.md)\ [`_cprintf`, `_cprintf_l`, `_cwprintf`, `_cwprintf_l`](cprintf-cprintf-l-cwprintf-cwprintf-l.md)\ [`va_arg`, `va_copy`, `va_end`, `va_start`](va-arg-va-copy-va-end-va-start.md)\ -[printf_p Positional Parameters](../printf-p-positional-parameters.md) +[`printf_p` positional parameters](../printf-p-positional-parameters.md)