<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://programmingexamples.net/w/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://programmingexamples.net/w/index.php?action=history&amp;feed=atom&amp;title=CPP%2FClasses%2FDerivedClass</id>
		<title>CPP/Classes/DerivedClass - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://programmingexamples.net/w/index.php?action=history&amp;feed=atom&amp;title=CPP%2FClasses%2FDerivedClass"/>
		<link rel="alternate" type="text/html" href="http://programmingexamples.net/w/index.php?title=CPP/Classes/DerivedClass&amp;action=history"/>
		<updated>2026-04-16T03:28:35Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.5</generator>

	<entry>
		<id>http://programmingexamples.net/w/index.php?title=CPP/Classes/DerivedClass&amp;diff=55&amp;oldid=prev</id>
		<title>Daviddoria: Created page with '==DerivedClass.cpp== &lt;source lang=&quot;cpp&quot;&gt; #include &lt;iostream&gt; #include &lt;string&gt;  class Person {      public:     std::string Name;     Person(){}      };  class Child : public Per…'</title>
		<link rel="alternate" type="text/html" href="http://programmingexamples.net/w/index.php?title=CPP/Classes/DerivedClass&amp;diff=55&amp;oldid=prev"/>
				<updated>2010-06-23T12:06:23Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;#039;==DerivedClass.cpp== &amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt; #include &amp;lt;iostream&amp;gt; #include &amp;lt;string&amp;gt;  class Person {      public:     std::string Name;     Person(){}      };  class Child : public Per…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==DerivedClass.cpp==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class Person&lt;br /&gt;
{&lt;br /&gt;
  &lt;br /&gt;
  public:&lt;br /&gt;
    std::string Name;&lt;br /&gt;
    Person(){}&lt;br /&gt;
    &lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
class Child : public Person&lt;br /&gt;
{&lt;br /&gt;
  &lt;br /&gt;
  public:&lt;br /&gt;
    std::string ParentName;&lt;br /&gt;
    Child(){}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[])&lt;br /&gt;
{&lt;br /&gt;
  Person* A = new Person;&lt;br /&gt;
  A-&amp;gt;Name = &amp;quot;TestPerson&amp;quot;;&lt;br /&gt;
  std::cout &amp;lt;&amp;lt; A-&amp;gt;Name &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
  &lt;br /&gt;
  Child* C = new Child;&lt;br /&gt;
  C-&amp;gt;Name = &amp;quot;TestChild&amp;quot;;&lt;br /&gt;
  C-&amp;gt;ParentName = &amp;quot;TestChildParent&amp;quot;;&lt;br /&gt;
  std::cout &amp;lt;&amp;lt; C-&amp;gt;Name &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
  std::cout &amp;lt;&amp;lt; C-&amp;gt;ParentName &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
  &lt;br /&gt;
  Person *TestPerson;&lt;br /&gt;
  &lt;br /&gt;
  TestPerson = new Child;&lt;br /&gt;
  TestPerson-&amp;gt;Name = &amp;quot;Working&amp;quot;;&lt;br /&gt;
  std::cout &amp;lt;&amp;lt; TestPerson-&amp;gt;Name &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
  &lt;br /&gt;
  //TestPerson-&amp;gt;ParentName = &amp;quot;Working&amp;quot;;&lt;br /&gt;
  //std::cout &amp;lt;&amp;lt; TestPerson-&amp;gt;ParentName &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
  &lt;br /&gt;
  &lt;br /&gt;
  &lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Daviddoria</name></author>	</entry>

	</feed>