macro
<cstdarg>
va_endvoid va_end (va_list ap);
End using variable argument list
Performs the appropriate actions to facilitate a normal return by a function that has used the va_list object ap to retrieve its additional arguments.This macro should be invoked before the function returns whenever va_start has been invoked from that function.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* va_end example */
#include <stdio.h> /* puts */
#include <stdarg.h> /* va_list, va_start, va_arg, va_end */
void PrintLines (char* first, ...)
{
char* str;
va_list vl;
str=first;
va_start(vl,first);
do {
puts(str);
str=va_arg(vl,char*);
} while (str!=NULL);
va_end(vl);
}
int main ()
{
PrintLines ("First","Second","Third","Fourth",NULL);
return 0;
}
Output:
First Second Third Fourth
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4