class ParentClass
{ private int x;
public ParentClass( ) { x = 0; }
public ParentClass( int i ) { x = i; }
};
class childClass : ParentClass
{ private int y;
public childClass ( ) { y = 0; }
public childClass ( int i ) { y = i; }
public childClass ( int i, int j ):A(i) { y = j; }
};
childClass c1 = new childClass (); //执行基类ParentClass的构造函数ParentClass(),再执行派生类的构造函数childClass ()
childClass c2 = new childClass (1); //执行基类ParentClass的构造函数ParentClass(),再执行派生类的构造函数childClass (int)
childClass c3 = new childClass (0,1); //执行执行基类ParentClass的构造函数A(int) ,再执行派生类的