title: simple ctor dilema - inheritance
body: <p>What is the outcome of the following code, and please describe why :)</p>
  
  <pre><code>class Mother
  {
    public:
      Mother ( ) {
          cout &lt;&lt; "r" &lt;&lt; endl;
      }
      ~Mother ( )
      {
          cout &lt;&lt; "n" &lt;&lt; endl;
      }
  };
  class Daughter: public Mother
  {
    public:
      Daughter ( )
      {
          cout &lt;&lt; "a" &lt;&lt; endl;
      }
      ~Daughter ( )
      {
          cout &lt;&lt; "b" &lt;&lt; endl;
      }
  };
  void foo(Mother m){ cout&lt;&lt; "foo" &lt;&lt;endl;}
  int main( )
  {
      Daughter lea;
      Mother* Rachel;
      foo(lea);
  }
  </code></pre>
  
  <p>I am not sure why, but someone told me it will be:
  r,a,foo,n,b,n (from left to right)</p>
  
  <p>Why calling "Daughter lea" generates r and a? due to inheritance?
  And why did "foo" suddenly appear? shouldn't it be last?
  Thanks!</p>