The call sequence of the Constructors between Derived Class and base class
<p>I've known that if B is derived from A, then when I create a new object of B, for example b, the constructor of A will call first. When I destroy the object b, The destructor of B will call first. Then I have a question here, if there're more than one constructor in the Base class, which constructor will call ? and why?</p>

<p>I've write one test program below, I guess it will call the default constructor in the Base class, But I'm not sure if it is just a coincidence?</p>

<pre><code>#include &lt;iostream&gt;
using namespace std;

class A{
    public:
    A(int i){cout&lt;&lt;"A con with param"&lt;&lt;endl;}
    A(){cout&lt;&lt;"A con"&lt;&lt;endl;}
    ~A(){}
};

class B : public A
{
    public:
    B(int i){cout&lt;&lt;"B con with param"&lt;&lt;endl;}
    B(){cout&lt;&lt;"B con"&lt;&lt;endl;}
    ~B(){}
};

int main()
{
    B b(5);
    return 0;
}
</code></pre>

<p>I wonder if any boss can tell me the reason or any advise to figure out this problem?</p>
