<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: 7.14 &#8212; Ellipses (and why to avoid them)</title>
	<atom:link href="http://www.learncpp.com/cpp-tutorial/714-ellipses-and-why-to-avoid-them/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.learncpp.com/cpp-tutorial/714-ellipses-and-why-to-avoid-them/</link>
	<description></description>
	<lastBuildDate>Thu, 09 Sep 2010 12:59:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Bob</title>
		<link>http://www.learncpp.com/cpp-tutorial/714-ellipses-and-why-to-avoid-them/comment-page-1/#comment-91403</link>
		<dc:creator>Bob</dc:creator>
		<pubDate>Sat, 04 Sep 2010 20:44:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/714-ellipses-and-why-to-avoid-them/#comment-91403</guid>
		<description>Or he should add a report spam button, or even a &quot;vote spam&quot; so if Alex isn&#039;t around people can vote spam off and wait for admin approval.</description>
		<content:encoded><![CDATA[<p>Or he should add a report spam button, or even a &#8220;vote spam&#8221; so if Alex isn&#8217;t around people can vote spam off and wait for admin approval.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: twilight</title>
		<link>http://www.learncpp.com/cpp-tutorial/714-ellipses-and-why-to-avoid-them/comment-page-1/#comment-66647</link>
		<dc:creator>twilight</dc:creator>
		<pubDate>Wed, 19 Aug 2009 12:17:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/714-ellipses-and-why-to-avoid-them/#comment-66647</guid>
		<description>oh, how nice you are... and we even know what exactly it is you are upset about...</description>
		<content:encoded><![CDATA[<p>oh, how nice you are&#8230; and we even know what exactly it is you are upset about&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: baldo</title>
		<link>http://www.learncpp.com/cpp-tutorial/714-ellipses-and-why-to-avoid-them/comment-page-1/#comment-66475</link>
		<dc:creator>baldo</dc:creator>
		<pubDate>Mon, 17 Aug 2009 15:41:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/714-ellipses-and-why-to-avoid-them/#comment-66475</guid>
		<description>Hey Alex, I suggest cleaning many of the spam or useless comments because they clutter the rest of comments that are really useful. Thanks!</description>
		<content:encoded><![CDATA[<p>Hey Alex, I suggest cleaning many of the spam or useless comments because they clutter the rest of comments that are really useful. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gates Bill</title>
		<link>http://www.learncpp.com/cpp-tutorial/714-ellipses-and-why-to-avoid-them/comment-page-1/#comment-64790</link>
		<dc:creator>Gates Bill</dc:creator>
		<pubDate>Wed, 22 Jul 2009 17:34:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/714-ellipses-and-why-to-avoid-them/#comment-64790</guid>
		<description>Fuck you</description>
		<content:encoded><![CDATA[<p>Fuck you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: a</title>
		<link>http://www.learncpp.com/cpp-tutorial/714-ellipses-and-why-to-avoid-them/comment-page-1/#comment-60230</link>
		<dc:creator>a</dc:creator>
		<pubDate>Fri, 08 May 2009 02:50:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/714-ellipses-and-why-to-avoid-them/#comment-60230</guid>
		<description>&quot;Consequently, the first call to va_arg will only read the first 4 types of the double (producing a garbage result), &quot;

shouldn&#039;t that read &quot;first 4 &lt;i&gt;bytes&lt;/i&gt;&quot;?</description>
		<content:encoded><![CDATA[<p>&#8220;Consequently, the first call to va_arg will only read the first 4 types of the double (producing a garbage result), &#8221;</p>
<p>shouldn&#8217;t that read &#8220;first 4 <i>bytes</i>&#8220;?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://www.learncpp.com/cpp-tutorial/714-ellipses-and-why-to-avoid-them/comment-page-1/#comment-59745</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Sat, 02 May 2009 04:37:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/714-ellipses-and-why-to-avoid-them/#comment-59745</guid>
		<description>Yeah, I didn&#039;t want to encourage people to try to clone printf().</description>
		<content:encoded><![CDATA[<p>Yeah, I didn&#8217;t want to encourage people to try to clone printf().</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://www.learncpp.com/cpp-tutorial/714-ellipses-and-why-to-avoid-them/comment-page-1/#comment-55321</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Thu, 02 Apr 2009 10:16:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/714-ellipses-and-why-to-avoid-them/#comment-55321</guid>
		<description>I think it might be worth mentioning the ellipses&#039; value in formatted-string functions such as the printf() family.
It would be ideal for implementing a date() function similar to that in PHP, for instance, where the number and type of parameters is explicitly defined in the format string. Obviously this is also dangerous (possibly even more so) but it would demonstrate handling mixed-type variable arguments. Of course it might also demonstrate How To Break Your Stack (TM).</description>
		<content:encoded><![CDATA[<p>I think it might be worth mentioning the ellipses&#8217; value in formatted-string functions such as the printf() family.<br />
It would be ideal for implementing a date() function similar to that in PHP, for instance, where the number and type of parameters is explicitly defined in the format string. Obviously this is also dangerous (possibly even more so) but it would demonstrate handling mixed-type variable arguments. Of course it might also demonstrate How To Break Your Stack (TM).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Learn C++ - &#187; 15.4 &#8212; Uncaught exceptions, catch-all handlers, and exception specifiers</title>
		<link>http://www.learncpp.com/cpp-tutorial/714-ellipses-and-why-to-avoid-them/comment-page-1/#comment-30974</link>
		<dc:creator>Learn C++ - &#187; 15.4 &#8212; Uncaught exceptions, catch-all handlers, and exception specifiers</dc:creator>
		<pubDate>Sat, 25 Oct 2008 20:07:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/714-ellipses-and-why-to-avoid-them/#comment-30974</guid>
		<description>[...] it uses the ellipses operator (&#8230;) as the type to catch. If you recall from lesson 7.14 on ellipses and why to avoid them, ellipses were previously used to pass arguments of any type to a function. In this context, they [...]</description>
		<content:encoded><![CDATA[<p>[...] it uses the ellipses operator (&#8230;) as the type to catch. If you recall from lesson 7.14 on ellipses and why to avoid them, ellipses were previously used to pass arguments of any type to a function. In this context, they [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Learn C++ - &#187; 7.13 &#8212; Command line arguments</title>
		<link>http://www.learncpp.com/cpp-tutorial/714-ellipses-and-why-to-avoid-them/comment-page-1/#comment-13498</link>
		<dc:creator>Learn C++ - &#187; 7.13 &#8212; Command line arguments</dc:creator>
		<pubDate>Tue, 29 Apr 2008 05:08:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/714-ellipses-and-why-to-avoid-them/#comment-13498</guid>
		<description>[...]  &#171; 12.6 &#8212; Pure virtual functions, abstract base classes, and interface classes &#124; Home &#124; 7.14 &#8212; Ellipses (and why to avoid them) &#187;     Friday, February 15th, 2008 at 4:06 [...]</description>
		<content:encoded><![CDATA[<p>[...]  &laquo; 12.6 &#8212; Pure virtual functions, abstract base classes, and interface classes | Home | 7.14 &#8212; Ellipses (and why to avoid them) &raquo;     Friday, February 15th, 2008 at 4:06 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://www.learncpp.com/cpp-tutorial/714-ellipses-and-why-to-avoid-them/comment-page-1/#comment-10293</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Mon, 24 Mar 2008 22:34:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/714-ellipses-and-why-to-avoid-them/#comment-10293</guid>
		<description>My understanding (and I may be wrong about this) is that the implemention of va_start() and va_args() is left up to the compiler.  If that&#039;s actually the case, then va_end() could do any necessary cleanup.

I looked at how va_end() was implemented in Microsoft Visual Studio and this is how it is defined:

&lt;pre&gt;
#define va_end(ap) ap = (va_list)0
&lt;/pre&gt;

As you can see, it&#039;s actually a macro function that just sets the ap parameter to 0.  So, at least with Microsoft Visual Studio, there&#039;s no real practical effect of calling va_end(), outside of maybe NULLing your list in case you inadvertently try to use it again without calling va_start().

In your example, you&#039;d have to pass list into va_end(), but va_start() should cause the list to start at the beginning of the ellipses again -- so yes, nX would be the first element of the ellipses.</description>
		<content:encoded><![CDATA[<p>My understanding (and I may be wrong about this) is that the implemention of va_start() and va_args() is left up to the compiler.  If that&#8217;s actually the case, then va_end() could do any necessary cleanup.</p>
<p>I looked at how va_end() was implemented in Microsoft Visual Studio and this is how it is defined:</p>
<pre>
#define va_end(ap) ap = (va_list)0
</pre>
<p>As you can see, it&#8217;s actually a macro function that just sets the ap parameter to 0.  So, at least with Microsoft Visual Studio, there&#8217;s no real practical effect of calling va_end(), outside of maybe NULLing your list in case you inadvertently try to use it again without calling va_start().</p>
<p>In your example, you&#8217;d have to pass list into va_end(), but va_start() should cause the list to start at the beginning of the ellipses again &#8212; so yes, nX would be the first element of the ellipses.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
