<?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: 10.3 &#8212; Aggregation</title>
	<atom:link href="http://www.learncpp.com/cpp-tutorial/103-aggregation/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.learncpp.com/cpp-tutorial/103-aggregation/</link>
	<description></description>
	<lastBuildDate>Thu, 02 Feb 2012 21:20:10 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: maxatan</title>
		<link>http://www.learncpp.com/cpp-tutorial/103-aggregation/comment-page-1/#comment-96401</link>
		<dc:creator>maxatan</dc:creator>
		<pubDate>Thu, 17 Nov 2011 20:55:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/103-aggregation/#comment-96401</guid>
		<description>Hi ! and congratulations for your job !

However, I have a question : What would be the code with more than one teacher belonging to the Department ? How will you implement it ? With a list of pointers to Teachers (list) ?

Thank you in advance for your advice</description>
		<content:encoded><![CDATA[<p>Hi ! and congratulations for your job !</p>
<p>However, I have a question : What would be the code with more than one teacher belonging to the Department ? How will you implement it ? With a list of pointers to Teachers (list) ?</p>
<p>Thank you in advance for your advice</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mccp13</title>
		<link>http://www.learncpp.com/cpp-tutorial/103-aggregation/comment-page-1/#comment-95400</link>
		<dc:creator>mccp13</dc:creator>
		<pubDate>Sun, 01 May 2011 08:57:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/103-aggregation/#comment-95400</guid>
		<description>I still don&#039;t get the pointer *m_pcTeacher. when m_pcTeacher recieves pTeacher, it means that m_pTeacher and pTeacher are pointing to the same address. So when m_pcTeacher is destroyed doesn&#039;t that mean that the address to which it is pointing to is freed, so when pTeacher gets the contents of the address, it could have changed since it is already free and ready to be used by some other program...???</description>
		<content:encoded><![CDATA[<p>I still don&#8217;t get the pointer *m_pcTeacher. when m_pcTeacher recieves pTeacher, it means that m_pTeacher and pTeacher are pointing to the same address. So when m_pcTeacher is destroyed doesn&#8217;t that mean that the address to which it is pointing to is freed, so when pTeacher gets the contents of the address, it could have changed since it is already free and ready to be used by some other program&#8230;???</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hector</title>
		<link>http://www.learncpp.com/cpp-tutorial/103-aggregation/comment-page-1/#comment-94808</link>
		<dc:creator>hector</dc:creator>
		<pubDate>Fri, 29 Oct 2010 21:14:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/103-aggregation/#comment-94808</guid>
		<description>I love the new look of the site yo :)</description>
		<content:encoded><![CDATA[<p>I love the new look of the site yo :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amit</title>
		<link>http://www.learncpp.com/cpp-tutorial/103-aggregation/comment-page-1/#comment-89454</link>
		<dc:creator>Amit</dc:creator>
		<pubDate>Mon, 02 Aug 2010 07:01:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/103-aggregation/#comment-89454</guid>
		<description>Thanks for teh description but there are couple of loose ends:
1. How is association different from aggregation and composition ? You may want to add a section on that
2. If a class has a data member(only one)  which points to another object but this is not allocated/dealloacted in constructor and destructor. Will this be aggregation or composition ? For teh relation to be aggregation is it necessary that you should have more that one object of the same type ?</description>
		<content:encoded><![CDATA[<p>Thanks for teh description but there are couple of loose ends:<br />
1. How is association different from aggregation and composition ? You may want to add a section on that<br />
2. If a class has a data member(only one)  which points to another object but this is not allocated/dealloacted in constructor and destructor. Will this be aggregation or composition ? For teh relation to be aggregation is it necessary that you should have more that one object of the same type ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: C++ Tutorial and Online Ebook</title>
		<link>http://www.learncpp.com/cpp-tutorial/103-aggregation/comment-page-1/#comment-87414</link>
		<dc:creator>C++ Tutorial and Online Ebook</dc:creator>
		<pubDate>Wed, 30 Jun 2010 01:00:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/103-aggregation/#comment-87414</guid>
		<description>[...] 10.3 Aggregation [...]</description>
		<content:encoded><![CDATA[<p>[...] 10.3 Aggregation [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: auasp</title>
		<link>http://www.learncpp.com/cpp-tutorial/103-aggregation/comment-page-1/#comment-85338</link>
		<dc:creator>auasp</dc:creator>
		<pubDate>Tue, 25 May 2010 15:14:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/103-aggregation/#comment-85338</guid>
		<description>the heading of this lesson is Aggregration.
(one extra r)</description>
		<content:encoded><![CDATA[<p>the heading of this lesson is Aggregration.<br />
(one extra r)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ishrat Ali Khan</title>
		<link>http://www.learncpp.com/cpp-tutorial/103-aggregation/comment-page-1/#comment-84743</link>
		<dc:creator>Ishrat Ali Khan</dc:creator>
		<pubDate>Sun, 16 May 2010 08:21:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/103-aggregation/#comment-84743</guid>
		<description>Hi Zafar,
I found that name of classes and constructors same for Teacher and Department.

This is very good example, i got clear understanding of agreegation and composition.

I hope i could help others guy as well.

I would like to offer my sincere thanks to Alex.

Regards,
Ishrat</description>
		<content:encoded><![CDATA[<p>Hi Zafar,<br />
I found that name of classes and constructors same for Teacher and Department.</p>
<p>This is very good example, i got clear understanding of agreegation and composition.</p>
<p>I hope i could help others guy as well.</p>
<p>I would like to offer my sincere thanks to Alex.</p>
<p>Regards,<br />
Ishrat</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: serenity</title>
		<link>http://www.learncpp.com/cpp-tutorial/103-aggregation/comment-page-1/#comment-73568</link>
		<dc:creator>serenity</dc:creator>
		<pubDate>Thu, 03 Dec 2009 16:49:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/103-aggregation/#comment-73568</guid>
		<description>f117f117f117677: &quot;class Department&quot; doesn&#039;t actaully delete the teacher; the only thing removed when it&#039;s destroyed is its pointer to the teacher. The pointer in main() remains and is still valid, so there is no wild pointer and no double delete.</description>
		<content:encoded><![CDATA[<p>f117f117f117677: &#8220;class Department&#8221; doesn&#8217;t actaully delete the teacher; the only thing removed when it&#8217;s destroyed is its pointer to the teacher. The pointer in main() remains and is still valid, so there is no wild pointer and no double delete.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: f117f117f117677</title>
		<link>http://www.learncpp.com/cpp-tutorial/103-aggregation/comment-page-1/#comment-65647</link>
		<dc:creator>f117f117f117677</dc:creator>
		<pubDate>Wed, 05 Aug 2009 02:49:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/103-aggregation/#comment-65647</guid>
		<description>Hi: Alex
as you said
there are two pointers point to Teacher(&quot;Bob&quot;). pTeacher and m_pcTeacher

if aggregate class is destroyed then m_pcTeacher is destroyed. So 
teacher(&quot;Bob&quot;) is gone(died).

but delete pTeacher again?  is this problem? pTeacher become a wild pointer?</description>
		<content:encoded><![CDATA[<p>Hi: Alex<br />
as you said<br />
there are two pointers point to Teacher(&#8220;Bob&#8221;). pTeacher and m_pcTeacher</p>
<p>if aggregate class is destroyed then m_pcTeacher is destroyed. So<br />
teacher(&#8220;Bob&#8221;) is gone(died).</p>
<p>but delete pTeacher again?  is this problem? pTeacher become a wild pointer?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jason</title>
		<link>http://www.learncpp.com/cpp-tutorial/103-aggregation/comment-page-1/#comment-65524</link>
		<dc:creator>jason</dc:creator>
		<pubDate>Mon, 03 Aug 2009 06:43:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/cpp-tutorial/103-aggregation/#comment-65524</guid>
		<description>This &quot;is&quot; the default constructor so, the signature does match.

Department(Teacher *pcTeacher=NULL)
        : m_pcTeacher(pcTeacher)
    {
    }</description>
		<content:encoded><![CDATA[<p>This &#8220;is&#8221; the default constructor so, the signature does match.</p>
<p>Department(Teacher *pcTeacher=NULL)<br />
        : m_pcTeacher(pcTeacher)<br />
    {<br />
    }</p>
]]></content:encoded>
	</item>
</channel>
</rss>

