Passing the address of an object causes parent class constructor to be called
<p>main.cpp:</p>

<pre><code>options my_options;
tree my_trees;
CODON_alphabet my_alphabet(1);
likelihood_engine my_likelihood(&amp;my_options, &amp;my_trees, &amp;my_sites);
CODON_M0 m0(&amp;my_trees, &amp;my_alphabet, &amp;my_likelihood);
</code></pre>

<p>The class CODON_alphabet has as a parent the class alphabet.  When I create the CODON_M0 object, for some reason the constructors for the classes alphabet and CODON_alphabet are each called twice.  This happens before the first line of the CODON_M0 constructor is hit.  Can anyone point me the right direction to figure out why this is happening?  If I'm missing any important information, please let me know.  Thanks.</p>

<p>EDIT: Sorry, I assumed everyone here could read my mind.  Here is some code that I've reduced to do as little as possible, but the unwanted constructors are still called.</p>

<pre><code>class CODON_M0: public CODON_model
{
   public: 
   CODON_M0(tree* tree_ptr, CODON_alphabet* alpha_ptr, likelihood_engine* like_ptr)
}

class CODON_model: public model
{
    public:
    CODON_alphabet* my_alphabet;
    CODON_model(tree* tree_ptr, CODON_alphabet* alpha_ptr, likelihood_engine* like_ptr)
}

class model
{
   public:
   model() {}
}

class CODON_alphabet: public alphabet
{
    public:
    CODON_alphabet()
    {
        cout &lt;&lt; "\n\n\n *** CODON_alphabet constructor called. *** \n\n\n";
    }
}

class alphabet
{
    public:
    alphabet()
    {
        cout &lt;&lt; "\n\n\n *** alphabet constuctor called. *** \n\n\n";
    }
}
</code></pre>

<p>I'm stepping through the code in gdb and when I hit the line that creates the CODON_M0 object and step into the constructor, I see the messages that the alphabet and CODON_alphabet constructors have been called twice.  Why?</p>
