<?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: C++ Unary and binary operator overloading and static members</title>
	<atom:link href="http://www.codingunit.com/cplusplus-tutorial-unary-and-binary-operator-overloading-and-static-members/feed" rel="self" type="application/rss+xml" />
	<link>http://www.codingunit.com/cplusplus-tutorial-unary-and-binary-operator-overloading-and-static-members</link>
	<description>CodingUnit is your online resource for learning to program. Tutorials on C, C++, PHP, Python, MySQL, Java, JQuery, Opengl, DirectX and much more!</description>
	<lastBuildDate>Sun, 29 Aug 2010 12:24:36 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
	<item>
		<title>By: admin</title>
		<link>http://www.codingunit.com/cplusplus-tutorial-unary-and-binary-operator-overloading-and-static-members/comment-page-1#comment-990</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Thu, 24 Jun 2010 17:23:09 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/?p=531#comment-990</guid>
		<description>@Tim
Yes, I see what you mean now. (I always did a postfix instead of a prefix and postfix). I&#039;ve corrected the example and also changed the other examples to things you send by email. 

Thank you for helping to improve this tutorial.</description>
		<content:encoded><![CDATA[<p>@Tim<br />
Yes, I see what you mean now. (I always did a postfix instead of a prefix and postfix). I&#8217;ve corrected the example and also changed the other examples to things you send by email. </p>
<p>Thank you for helping to improve this tutorial.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim</title>
		<link>http://www.codingunit.com/cplusplus-tutorial-unary-and-binary-operator-overloading-and-static-members/comment-page-1#comment-972</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Wed, 23 Jun 2010 19:59:43 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/?p=531#comment-972</guid>
		<description>Well, I must say, while I can see you improved the tutorial, my point is still not addressed. Try using normal ints instead of Inc instances, you&#039;ll see what I mean:
int a = 0;
int b = a++;
cout &lt;&lt; a &lt;&lt; endl; // This prints 1, ok.
cout &lt;&lt; b &lt;&lt; endl; // This prints 0, not 1!

This tutorial program prints this:
Result prefix (on a) and postfix (on b)
c = 2
d = 6
While it should really print this:
Result prefix (on a) and postfix (on b)
c = 2
d = 5

This is because Inc operator++(int) is not implemented correctly.</description>
		<content:encoded><![CDATA[<p>Well, I must say, while I can see you improved the tutorial, my point is still not addressed. Try using normal ints instead of Inc instances, you&#8217;ll see what I mean:<br />
int a = 0;<br />
int b = a++;<br />
cout &lt;&lt; a &lt;&lt; endl; // This prints 1, ok.<br />
cout &lt;&lt; b &lt;&lt; endl; // This prints 0, not 1!</p>
<p>This tutorial program prints this:<br />
Result prefix (on a) and postfix (on b)<br />
c = 2<br />
d = 6<br />
While it should really print this:<br />
Result prefix (on a) and postfix (on b)<br />
c = 2<br />
d = 5</p>
<p>This is because Inc operator++(int) is not implemented correctly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.codingunit.com/cplusplus-tutorial-unary-and-binary-operator-overloading-and-static-members/comment-page-1#comment-971</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Tue, 22 Jun 2010 21:22:28 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/?p=531#comment-971</guid>
		<description>Tim, you are right! So &lt;strong&gt;we have re-written the tutorial&lt;/strong&gt;. 
The new tutorial (see above) should be much easier to understand than the old one.
It also has more (larger and complete) examples and we&#039;ve added a download link to the source.
Also added a link to an unary and binary operator table .

So we hope you and the other visitors will like it!</description>
		<content:encoded><![CDATA[<p>Tim, you are right! So <strong>we have re-written the tutorial</strong>.<br />
The new tutorial (see above) should be much easier to understand than the old one.<br />
It also has more (larger and complete) examples and we&#8217;ve added a download link to the source.<br />
Also added a link to an unary and binary operator table .</p>
<p>So we hope you and the other visitors will like it!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim</title>
		<link>http://www.codingunit.com/cplusplus-tutorial-unary-and-binary-operator-overloading-and-static-members/comment-page-1#comment-969</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Tue, 22 Jun 2010 09:45:01 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/?p=531#comment-969</guid>
		<description>&lt;strong&gt;EDIT: see comment of the admin below!&lt;/strong&gt; The code in mentioned in this comment is not used in the re-written C++ tutorial.

Original comment:
In this tutorial, pre- and post-increment are implemented identical. This is not correct. They are not the same thing. The difference is that post-increment will return the OLD value. They should be more like this:


	Rational&amp; operator++()
	{
		num += den;
		return *this;
	}

	Rational operator++(int)
	{
		Rational old_value(*this);
		++(*this); // Or you could just write: num += den;
		return old_value;
	}

kthxbye</description>
		<content:encoded><![CDATA[<p><strong>EDIT: see comment of the admin below!</strong> The code in mentioned in this comment is not used in the re-written C++ tutorial.</p>
<p>Original comment:<br />
In this tutorial, pre- and post-increment are implemented identical. This is not correct. They are not the same thing. The difference is that post-increment will return the OLD value. They should be more like this:</p>
<p>	Rational&amp; operator++()<br />
	{<br />
		num += den;<br />
		return *this;<br />
	}</p>
<p>	Rational operator++(int)<br />
	{<br />
		Rational old_value(*this);<br />
		++(*this); // Or you could just write: num += den;<br />
		return old_value;<br />
	}</p>
<p>kthxbye</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hala Khanji</title>
		<link>http://www.codingunit.com/cplusplus-tutorial-unary-and-binary-operator-overloading-and-static-members/comment-page-1#comment-926</link>
		<dc:creator>Hala Khanji</dc:creator>
		<pubDate>Sat, 01 May 2010 14:09:04 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/?p=531#comment-926</guid>
		<description>Thaaaaaaaaaaaaaaaaaaaaaaank you very much! You really helped me out :). You see my doctors suck at teaching!</description>
		<content:encoded><![CDATA[<p>Thaaaaaaaaaaaaaaaaaaaaaaank you very much! You really helped me out <img src='http://www.codingunit.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . You see my doctors suck at teaching!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: abhishek</title>
		<link>http://www.codingunit.com/cplusplus-tutorial-unary-and-binary-operator-overloading-and-static-members/comment-page-1#comment-186</link>
		<dc:creator>abhishek</dc:creator>
		<pubDate>Sat, 05 Dec 2009 07:06:29 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/?p=531#comment-186</guid>
		<description>its amazing..
its very easy understandable...
thank..</description>
		<content:encoded><![CDATA[<p>its amazing..<br />
its very easy understandable&#8230;<br />
thank..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sabera</title>
		<link>http://www.codingunit.com/cplusplus-tutorial-unary-and-binary-operator-overloading-and-static-members/comment-page-1#comment-175</link>
		<dc:creator>sabera</dc:creator>
		<pubDate>Fri, 06 Nov 2009 14:58:46 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/?p=531#comment-175</guid>
		<description>itz very useful to me and its helped me to update my knowledge</description>
		<content:encoded><![CDATA[<p>itz very useful to me and its helped me to update my knowledge</p>
]]></content:encoded>
	</item>
</channel>
</rss>
