<?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>Mon, 06 Feb 2012 06:08:16 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: Manish Sohodebd</title>
		<link>http://www.codingunit.com/cplusplus-tutorial-unary-and-binary-operator-overloading-and-static-members/comment-page-1#comment-4353</link>
		<dc:creator>Manish Sohodebd</dc:creator>
		<pubDate>Mon, 12 Dec 2011 06:44:26 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/?p=531#comment-4353</guid>
		<description>Overload operator + and – for fraction using friend and then compute 2/3+1/2 in the main function.How can i do it??</description>
		<content:encoded><![CDATA[<p>Overload operator + and – for fraction using friend and then compute 2/3+1/2 in the main function.How can i do it??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: neetu mishra</title>
		<link>http://www.codingunit.com/cplusplus-tutorial-unary-and-binary-operator-overloading-and-static-members/comment-page-1#comment-4352</link>
		<dc:creator>neetu mishra</dc:creator>
		<pubDate>Sun, 11 Dec 2011 17:54:32 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/?p=531#comment-4352</guid>
		<description>thanks a lot for this easily understandable view---------------</description>
		<content:encoded><![CDATA[<p>thanks a lot for this easily understandable view&#8212;&#8212;&#8212;&#8212;&#8212;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: $$$</title>
		<link>http://www.codingunit.com/cplusplus-tutorial-unary-and-binary-operator-overloading-and-static-members/comment-page-1#comment-3255</link>
		<dc:creator>$$$</dc:creator>
		<pubDate>Sat, 26 Feb 2011 02:59:03 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/?p=531#comment-3255</guid>
		<description>#include
using namespace std;
class complex
float x,y;
public:
complex()
{
}
complex(float real,float img)
{
x=real;
y=img;
}
complex operator +(complex);
void display(void);
};
complex complex:operator +(complex c)
{
complex temp;
temp.x=x+c.x;
temp.y=y+c.y;
return(temp);
}
void complex::display(void);
{
cout&lt;&lt;x&lt;&lt;&quot;+j&quot;&lt;&lt;y;
}
main()
{
complex c1,c2,c3;
c1=complex(2,3)
ccomplex(1,2);
c3=c1+c2;
cout&lt;&lt;c1;
c1.display();
cout&lt;&lt;c2;
c2.display();
cout&lt;&lt;c3;
c3.display();
}</description>
		<content:encoded><![CDATA[<p>#include<br />
using namespace std;<br />
class complex<br />
float x,y;<br />
public:<br />
complex()<br />
{<br />
}<br />
complex(float real,float img)<br />
{<br />
x=real;<br />
y=img;<br />
}<br />
complex operator +(complex);<br />
void display(void);<br />
};<br />
complex complex:operator +(complex c)<br />
{<br />
complex temp;<br />
temp.x=x+c.x;<br />
temp.y=y+c.y;<br />
return(temp);<br />
}<br />
void complex::display(void);<br />
{<br />
cout&lt;&lt;x&lt;&lt;&quot;+j&quot;&lt;&lt;y;<br />
}<br />
main()<br />
{<br />
complex c1,c2,c3;<br />
c1=complex(2,3)<br />
ccomplex(1,2);<br />
c3=c1+c2;<br />
cout&lt;&lt;c1;<br />
c1.display();<br />
cout&lt;&lt;c2;<br />
c2.display();<br />
cout&lt;&lt;c3;<br />
c3.display();<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: as</title>
		<link>http://www.codingunit.com/cplusplus-tutorial-unary-and-binary-operator-overloading-and-static-members/comment-page-1#comment-3197</link>
		<dc:creator>as</dc:creator>
		<pubDate>Mon, 17 Jan 2011 12:42:42 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/?p=531#comment-3197</guid>
		<description>thanks...its very useful to me to understand this part</description>
		<content:encoded><![CDATA[<p>thanks&#8230;its very useful to me to understand this part</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aishwarya</title>
		<link>http://www.codingunit.com/cplusplus-tutorial-unary-and-binary-operator-overloading-and-static-members/comment-page-1#comment-3188</link>
		<dc:creator>Aishwarya</dc:creator>
		<pubDate>Sun, 09 Jan 2011 04:41:09 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/?p=531#comment-3188</guid>
		<description>Hmm..... Very simple program that every one can understand....!!! Thank uuuuuuu.......!!!!!!</description>
		<content:encoded><![CDATA[<p>Hmm&#8230;.. Very simple program that every one can understand&#8230;.!!! Thank uuuuuuu&#8230;&#8230;.!!!!!!</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-1960</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Sun, 05 Dec 2010 21:12:57 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/?p=531#comment-1960</guid>
		<description>@prince : we&#039;ve added a small tutorial &lt;a href=&quot;http://www.codingunit.com/cplusplus-binary-operator-overloading-greater-or-less-than&quot; title=&quot;overloading tutorial of greater than and less than&quot; rel=&quot;nofollow&quot;&gt;on overloading of &gt; and &lt; binary operators&lt;/a&gt;

We hope it helps!</description>
		<content:encoded><![CDATA[<p>@prince : we&#8217;ve added a small tutorial <a href="http://www.codingunit.com/cplusplus-binary-operator-overloading-greater-or-less-than" title="overloading tutorial of greater than and less than" rel="nofollow">on overloading of &gt; and &lt; binary operators</a></p>
<p>We hope it helps!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: prince</title>
		<link>http://www.codingunit.com/cplusplus-tutorial-unary-and-binary-operator-overloading-and-static-members/comment-page-1#comment-1956</link>
		<dc:creator>prince</dc:creator>
		<pubDate>Thu, 02 Dec 2010 08:46:41 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/?p=531#comment-1956</guid>
		<description>hi i want to overload &lt;&gt; operators</description>
		<content:encoded><![CDATA[<p>hi i want to overload &lt;&gt; operators</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ravindra</title>
		<link>http://www.codingunit.com/cplusplus-tutorial-unary-and-binary-operator-overloading-and-static-members/comment-page-1#comment-1892</link>
		<dc:creator>Ravindra</dc:creator>
		<pubDate>Sun, 10 Oct 2010 13:45:04 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/?p=531#comment-1892</guid>
		<description>This is good example of binary over overloading. This will help in my exam.</description>
		<content:encoded><![CDATA[<p>This is good example of binary over overloading. This will help in my exam.</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-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>
</channel>
</rss>

