<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://www.programmingexamples.net/w/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.programmingexamples.net/w/index.php?action=history&amp;feed=atom&amp;title=CPP%2FVariableNumberOfArguments</id>
		<title>CPP/VariableNumberOfArguments - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://www.programmingexamples.net/w/index.php?action=history&amp;feed=atom&amp;title=CPP%2FVariableNumberOfArguments"/>
		<link rel="alternate" type="text/html" href="http://www.programmingexamples.net/w/index.php?title=CPP/VariableNumberOfArguments&amp;action=history"/>
		<updated>2026-06-13T16:57:16Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.5</generator>

	<entry>
		<id>http://www.programmingexamples.net/w/index.php?title=CPP/VariableNumberOfArguments&amp;diff=130&amp;oldid=prev</id>
		<title>Daviddoria: Created page with '==VariableNumberOfArguments.cpp== &lt;source lang=&quot;cpp&quot;&gt; #include &lt;iostream&gt; #include &lt;stdarg.h&gt;  void Function1(unsigned int num, ...); void Function2(unsigned int num, va_list ap)…'</title>
		<link rel="alternate" type="text/html" href="http://www.programmingexamples.net/w/index.php?title=CPP/VariableNumberOfArguments&amp;diff=130&amp;oldid=prev"/>
				<updated>2010-06-23T13:20:10Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;#039;==VariableNumberOfArguments.cpp== &amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt; #include &amp;lt;iostream&amp;gt; #include &amp;lt;stdarg.h&amp;gt;  void Function1(unsigned int num, ...); void Function2(unsigned int num, va_list ap)…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==VariableNumberOfArguments.cpp==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;stdarg.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void Function1(unsigned int num, ...);&lt;br /&gt;
void Function2(unsigned int num, va_list ap);&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[])&lt;br /&gt;
{&lt;br /&gt;
  Function1(3, 1.0, 2.0, 3.0);&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void Function1(unsigned int num, ...)&lt;br /&gt;
{&lt;br /&gt;
  va_list ap;&lt;br /&gt;
&lt;br /&gt;
  va_start(ap, num);&lt;br /&gt;
&lt;br /&gt;
  Function2(num, ap);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void Function2(unsigned int num, va_list ap)&lt;br /&gt;
{&lt;br /&gt;
  for (unsigned int i = 0; i &amp;lt; num; i++)&lt;br /&gt;
    {&lt;br /&gt;
    double val = va_arg(ap,double);&lt;br /&gt;
    //printf (&amp;quot;\t%.2f&amp;quot;,val);&lt;br /&gt;
    std::cout &amp;lt;&amp;lt; &amp;quot;Val &amp;quot; &amp;lt;&amp;lt; i &amp;lt;&amp;lt; &amp;quot; : &amp;quot; &amp;lt;&amp;lt; val &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
  va_end(ap);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Daviddoria</name></author>	</entry>

	</feed>