Skip to content

Commit 71a36cc

Browse files
committed
UUF fix
1 parent b6a4fe8 commit 71a36cc

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

docs/cpp/functions-with-variable-argument-lists-cpp.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
---
22
description: "Learn more about: Functions with Variable Argument Lists (C++)"
33
title: "Functions with Variable Argument Lists (C++)"
4-
ms.date: "11/04/2016"
4+
ms.date: 05/01/2025
55
helpviewer_keywords: ["arguments [C++], variable number of", "variable argument lists", "declarators, functions", "argument lists [C++], variable number of", "declaring functions [C++], variables", "function calls, variable number of arguments"]
6-
ms.assetid: 27c2f83a-21dd-44c6-913c-2834cb944703
76
---
87
# Functions with Variable Argument Lists (C++)
98

10-
Function declarations in which the last member of is the ellipsis (...) can take a variable number of arguments. In these cases, C++ provides type checking only for the explicitly declared arguments. You can use variable argument lists when you need to make a function so general that even the number and types of arguments can vary. The family of functions is an example of functions that use variable argument lists.`printf`*argument-declaration-list*
9+
Function declarations in which the last member of is the ellipsis (...) can take a variable number of arguments. In these cases, C++ provides type checking only for the explicitly declared arguments. You can use variable argument lists when you need to make a function so general that even the number and types of arguments can vary. The `printf` family of functions is an example of functions that use variable argument lists.
1110

1211
## Functions with variable arguments
1312

14-
To access arguments after those declared, use the macros contained in the standard include file \<stdarg.h> as described below.
13+
To access arguments after those declared, use the macros contained in the standard include file `<stdarg.h>` as described below.
1514

1615
**Microsoft Specific**
1716

@@ -104,9 +103,6 @@ void ShowVar( char *szTypes, ... ) {
104103
The previous example illustrates these important concepts:
105104
106105
1. You must establish a list marker as a variable of type `va_list` before any variable arguments are accessed. In the previous example, the marker is called `vl`.
107-
108106
1. The individual arguments are accessed by using the `va_arg` macro. You must tell the `va_arg` macro the type of argument to retrieve so that it can transfer the correct number of bytes from the stack. If you specify an incorrect type of a size different from that supplied by the calling program to `va_arg`, the results are unpredictable.
109-
110107
1. You should explicitly cast the result obtained by using the `va_arg` macro to the type that you want.
111-
112-
You must call the macro to terminate variable-argument processing.`va_end`
108+
1. You must call the `va_end` macro to terminate variable-argument processing.

0 commit comments

Comments
 (0)