C++ Declarations
<p>I have a class, 'Cat', and a subclass of the Cat class, 'DerivedCat'. Cat has a function meow(), while DerivedCat overrides this function.</p>

<p>In an application, I declare a Cat object: </p>

<pre><code>Cat* cat;
</code></pre>

<p>Later in the application, I initialize the Cat instance:</p>

<pre><code>cat = new DerivedCat();
</code></pre>

<ol>
<li>Which 'meow()' gets called? Why?</li>
<li>What are the advantages of declaring as the superclass type like this?</li>
<li>What is an example of where I would want to do this?</li>
</ol>
