<?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"
	>
<channel>
	<title>Comments on: 7.3 &#8212; Passing arguments by reference</title>
	<atom:link href="http://www.learncpp.com/cpp-tutorial/73-passing-arguments-by-reference/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.learncpp.com/cpp-tutorial/73-passing-arguments-by-reference/</link>
	<description></description>
	<pubDate>Wed, 20 Aug 2008 09:01:31 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: parveen thakran</title>
		<link>http://www.learncpp.com/cpp-tutorial/73-passing-arguments-by-reference/#comment-20030</link>
		<dc:creator>parveen thakran</dc:creator>
		<pubDate>Sun, 29 Jun 2008 09:42:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/73-passing-arguments-by-reference/#comment-20030</guid>
		<description>
This example is very good i learn many things by this example thnax ...this site helps a lot 
</description>
		<content:encoded><![CDATA[<p>This example is very good i learn many things by this example thnax &#8230;this site helps a lot</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Learn C++ - &#187; 7.2 &#8212; Passing arguments by value</title>
		<link>http://www.learncpp.com/cpp-tutorial/73-passing-arguments-by-reference/#comment-13487</link>
		<dc:creator>Learn C++ - &#187; 7.2 &#8212; Passing arguments by value</dc:creator>
		<pubDate>Tue, 29 Apr 2008 04:58:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/73-passing-arguments-by-reference/#comment-13487</guid>
		<description>[...] 2007      Prev/Next Posts   &#171; 6.13 &#8212; Void pointers &#124; Home &#124; 7.3 &#8212; Passing arguments by reference &#187;     Monday, July 23rd, 2007 at 6:59 [...]</description>
		<content:encoded><![CDATA[<p>[...] 2007      Prev/Next Posts   &laquo; 6.13 &#8212; Void pointers | Home | 7.3 &#8212; Passing arguments by reference &raquo;     Monday, July 23rd, 2007 at 6:59 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://www.learncpp.com/cpp-tutorial/73-passing-arguments-by-reference/#comment-9998</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Thu, 20 Mar 2008 05:25:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/73-passing-arguments-by-reference/#comment-9998</guid>
		<description>Hello Alex -

This website is very helpful - Thanks! However, since you said above:

"By all means, point out anything you see. I want this site to be as good as it can be."

I will take this opportunity to point out that a few times you make the common mistake (or maybe just typo) of confusing the word "it's" with the word "its": The word "it's" is a contraction for "it is", while the word "its" (no apostrophe) shows possession, e.g. "&lt;b&gt;It's&lt;/b&gt; time to learn about the C++ language and &lt;b&gt;its&lt;/b&gt; many features."

If in doubt as to which is correct where, just substitute in "it is" and see if it makes sense - "&lt;b&gt;It is&lt;/b&gt; time to learn...." makes sense, but "and &lt;b&gt;it is&lt;/b&gt; many features" doesn't make sense - so use "its" without the apostrophe there.

Sorry if this is pedantic; I know it's minor, but it is a mistake nonetheless. :)

Examples:

section 6.10: "*pnPtr = 6; // pnPtr treats &lt;b&gt;it's&lt;/b&gt; value as const"

section 7.13: "// Loop through each argument and print &lt;b&gt;it's&lt;/b&gt; number and value"

In both cases, "it's" should be replaced with "its".

[ You are correct.  I'll get those fixed up. -Alex ]</description>
		<content:encoded><![CDATA[<p>Hello Alex -</p>
<p>This website is very helpful - Thanks! However, since you said above:</p>
<p>&#8220;By all means, point out anything you see. I want this site to be as good as it can be.&#8221;</p>
<p>I will take this opportunity to point out that a few times you make the common mistake (or maybe just typo) of confusing the word &#8220;it&#8217;s&#8221; with the word &#8220;its&#8221;: The word &#8220;it&#8217;s&#8221; is a contraction for &#8220;it is&#8221;, while the word &#8220;its&#8221; (no apostrophe) shows possession, e.g. &#8220;<b>It&#8217;s</b> time to learn about the C++ language and <b>its</b> many features.&#8221;</p>
<p>If in doubt as to which is correct where, just substitute in &#8220;it is&#8221; and see if it makes sense - &#8220;<b>It is</b> time to learn&#8230;.&#8221; makes sense, but &#8220;and <b>it is</b> many features&#8221; doesn&#8217;t make sense - so use &#8220;its&#8221; without the apostrophe there.</p>
<p>Sorry if this is pedantic; I know it&#8217;s minor, but it is a mistake nonetheless. :)</p>
<p>Examples:</p>
<p>section 6.10: &#8220;*pnPtr = 6; // pnPtr treats <b>it&#8217;s</b> value as const&#8221;</p>
<p>section 7.13: &#8220;// Loop through each argument and print <b>it&#8217;s</b> number and value&#8221;</p>
<p>In both cases, &#8220;it&#8217;s&#8221; should be replaced with &#8220;its&#8221;.</p>
<p>[ You are correct.  I'll get those fixed up. -Alex ]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chad</title>
		<link>http://www.learncpp.com/cpp-tutorial/73-passing-arguments-by-reference/#comment-8930</link>
		<dc:creator>Chad</dc:creator>
		<pubDate>Wed, 05 Mar 2008 04:29:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/73-passing-arguments-by-reference/#comment-8930</guid>
		<description>I would like a book too.  I don't know if the current books are as good, but I'll get one eventually.  I am going through this tutorial way too quickly to really grasp all the concepts.  I should slow down and treat it more like a class.  I think i want to speed through it, then come back for seconds.  I won't really learn until I start a real project.  I think I will be try to port my MATLAB code over, but it needs pretty much a complete rewrite haha and experimenting with many libraries.  I'm not ready yet.</description>
		<content:encoded><![CDATA[<p>I would like a book too.  I don&#8217;t know if the current books are as good, but I&#8217;ll get one eventually.  I am going through this tutorial way too quickly to really grasp all the concepts.  I should slow down and treat it more like a class.  I think i want to speed through it, then come back for seconds.  I won&#8217;t really learn until I start a real project.  I think I will be try to port my MATLAB code over, but it needs pretty much a complete rewrite haha and experimenting with many libraries.  I&#8217;m not ready yet.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BP</title>
		<link>http://www.learncpp.com/cpp-tutorial/73-passing-arguments-by-reference/#comment-8715</link>
		<dc:creator>BP</dc:creator>
		<pubDate>Sat, 01 Mar 2008 02:56:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/73-passing-arguments-by-reference/#comment-8715</guid>
		<description>Alex, your tutorial is of great value to me. Thanks. 
I believe that you made a typo in the first snippet: it should say 'void AddOne' instead of 'int AddOne'.
Cheers.

[ I did indeed!  Thanks for catching that. It's fixed now.  -Alex ]</description>
		<content:encoded><![CDATA[<p>Alex, your tutorial is of great value to me. Thanks.<br />
I believe that you made a typo in the first snippet: it should say &#8216;void AddOne&#8217; instead of &#8216;int AddOne&#8217;.<br />
Cheers.</p>
<p>[ I did indeed!  Thanks for catching that. It's fixed now.  -Alex ]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://www.learncpp.com/cpp-tutorial/73-passing-arguments-by-reference/#comment-8392</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Sun, 24 Feb 2008 08:43:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/73-passing-arguments-by-reference/#comment-8392</guid>
		<description>Returning a value by reference works just like passing a value by reference (except the data is moving from the function to the caller instead of the other way around).

When a value is returned by reference, a reference to the value is returned rather than the value itself.  This is most typically done with classes and structs, because returning a reference to a class or struct is fast, whereas making a copy of the class or struct is slow.</description>
		<content:encoded><![CDATA[<p>Returning a value by reference works just like passing a value by reference (except the data is moving from the function to the caller instead of the other way around).</p>
<p>When a value is returned by reference, a reference to the value is returned rather than the value itself.  This is most typically done with classes and structs, because returning a reference to a class or struct is fast, whereas making a copy of the class or struct is slow.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://www.learncpp.com/cpp-tutorial/73-passing-arguments-by-reference/#comment-8391</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Sun, 24 Feb 2008 08:32:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/73-passing-arguments-by-reference/#comment-8391</guid>
		<description>Prabhakar, I suggest you review &lt;a href="http://www.learncpp.com/cpp-tutorial/611-references/" rel="nofollow"&gt;the lesson on references&lt;/a&gt; to get a better understanding of what references are.

A const reference will not let you change the value it references.  Consequently, when we pass an variable by const reference, we are not allowed to change the value of the variable within the function.</description>
		<content:encoded><![CDATA[<p>Prabhakar, I suggest you review <a href="http://www.learncpp.com/cpp-tutorial/611-references/" rel="nofollow">the lesson on references</a> to get a better understanding of what references are.</p>
<p>A const reference will not let you change the value it references.  Consequently, when we pass an variable by const reference, we are not allowed to change the value of the variable within the function.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PRABHAKAR</title>
		<link>http://www.learncpp.com/cpp-tutorial/73-passing-arguments-by-reference/#comment-8389</link>
		<dc:creator>PRABHAKAR</dc:creator>
		<pubDate>Sun, 24 Feb 2008 07:39:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/73-passing-arguments-by-reference/#comment-8389</guid>
		<description>dear ALEX, i have already sent u my problem but i am herewith giving u the code i cant understand.
std::istream&#38; operator&#62;&#62;( std::istream&#38; input, Complex&#38; operand2 )
{
...
}

the return type as well as the two parameters are references. how can u explain for providing " return type as a reference" i am stuck up thanks prabhakar</description>
		<content:encoded><![CDATA[<p>dear ALEX, i have already sent u my problem but i am herewith giving u the code i cant understand.<br />
std::istream&amp; operator&gt;&gt;( std::istream&amp; input, Complex&amp; operand2 )<br />
{<br />
&#8230;<br />
}</p>
<p>the return type as well as the two parameters are references. how can u explain for providing &#8221; return type as a reference&#8221; i am stuck up thanks prabhakar</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PRABHAKAR</title>
		<link>http://www.learncpp.com/cpp-tutorial/73-passing-arguments-by-reference/#comment-8386</link>
		<dc:creator>PRABHAKAR</dc:creator>
		<pubDate>Sun, 24 Feb 2008 05:48:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/73-passing-arguments-by-reference/#comment-8386</guid>
		<description>dear ALEX, i am a novice to COMPUTERS.(born in 1938)but want to enjoy learning c++. i have tried to understand " We can pass by const reference to avoid unintentional changes." but nowhere i find an explanations re." constant return references". if i have missed this from your tutorial, please refer it to me. OR enlighten me re. "returning constant references with necessary explanations' please bear with my ignorance. thanks. i am enjoying your tutorials prabhakar</description>
		<content:encoded><![CDATA[<p>dear ALEX, i am a novice to COMPUTERS.(born in 1938)but want to enjoy learning c++. i have tried to understand &#8221; We can pass by const reference to avoid unintentional changes.&#8221; but nowhere i find an explanations re.&#8221; constant return references&#8221;. if i have missed this from your tutorial, please refer it to me. OR enlighten me re. &#8220;returning constant references with necessary explanations&#8217; please bear with my ignorance. thanks. i am enjoying your tutorials prabhakar</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Abhishek</title>
		<link>http://www.learncpp.com/cpp-tutorial/73-passing-arguments-by-reference/#comment-5789</link>
		<dc:creator>Abhishek</dc:creator>
		<pubDate>Thu, 10 Jan 2008 07:06:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/73-passing-arguments-by-reference/#comment-5789</guid>
		<description>Great!</description>
		<content:encoded><![CDATA[<p>Great!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
