Talk:Stdarg.h

Becoming a manual page?
This article seems to be a tutorial or manual page. I question the need for this page to exist at all. 75.119.90.35 (talk) 18:05, 24 October 2013 (UTC)

Untitled
C++

> though permitted, is deprecated in C++.

So what are the alternatives to in C++ ? --RzR 13:13, 3 December 2007 (UTC)


 * Using . Eric119 00:43, 4 December 2007 (UTC)

Damm useful page! :) —Preceding unsigned comment added by 210.212.160.101 (talk) 07:08, 12 March 2009 (UTC)

Infinite number of arguments
Shouldn't that be "arbitrary number of arguments"? You can't even create a call containing an infinite number of arguments, much less execute that call. —Preceding unsigned comment added by 79.120.193.114 (talk) 14:18, 24 November 2009 (UTC)

Varg pass-through
Is it possible for a varg function to process a couple of args, then pass the tail of the varg list through to another varg function? It would be useful to discuss that case. &mdash; MaxEnt 19:33, 14 June 2010 (UTC)

Terminating with -1
I was wrong: this example shows the use of -1 as an end-of-args marker, whereas the man page example (man stdarg) just keeps pulling arguments as long as more of them are demanded by the format string, the same as printf does, which is why there is no need for an end-of-args marker value. But I still think i >= 0 is a better test than i != -1. —Preceding unsigned comment added by 72.208.148.56 (talk) 00:23, 15 October 2010 (UTC)

Should we add gcc and clang's sentinel attribute?
Should we add ? It checks that the parameter list ends in. Allen Me (talk) 15:34, 19 November 2016 (UTC)

vsprintf or vsnprintf?
In this article it states the following. Which is it?

To call other var args functions from within your function (such as sprintf) you need to use the var arg version of the function (vsprintf in this example):

void MyPrintf(const char *format, ...) { va_list args; char buffer[BUFSIZ];

va_start(args, format); vsnprintf(buffer, sizeof buffer, format, args); va_end(args); FlushFunnyStream(buffer); }

What is FlushFunnyStream?
At the end of the example for MyPrintf, a function is called FlushFunnyStream(buffer). When looking this up, only sites using this example come up. What is this function supposed to mean? KawaiiAmber (talk) 09:14, 2 February 2022 (UTC)