问一个子类访问父类私有成员变量的有关问题

问一个子类访问父类私有成员变量的问题
我看到一本 < <C++编程--从问题分析到程序设计> > ,里面讲子类可以
继承父类所有的成员变量和函数,虽然子类能继承父类的私有成员
变量,但是不能直接访问父类的私有成员变量,但是可以通过父类的
public类型的成员函数来访问父类的私有成员变量
比如
class   BaseClass
{
private   :
    int   u;
    int   v;
public:
    void   display();
};
void   BaseClass:display()
{
    cout < < "u= " < <u < < ",v= " < <v < <endl;
}
class   SubClass:public   BaseClass
{
        private:
            int   x;
            int   y;
        public:
                void   display();
};
void   SubClass:display()
{
        BaseClass::display();
        cout < < "x= " < <x < < ",y= " < <y < <endl;
}
我省略了构造函数,这个例子表明子类SubClass可以通过display
来访问父类的私有成员变量u,v
那么,我自己又写了下面的程序,为什么永远都是打印出-1   ?

#include <iostream>
using   namespace   std;
class   person
{
private:
int   age;
public:
person();
person(int   age);
void   display();
};
void   person::display()
{
cout < < "In   Base   Class,age= " < <age < <endl;
}
person::person()
{
this-> age=-1;
        cout < < "Default   constructor " < <endl;
}
person::person(int   age)
{
this-> age=age;
cout < < "Argument " < <endl;
}
class   student:public   person
{
public:
student(int   b)
{
person::person(b);
}
void   display();

};
void   student::display()
{
person::display();
cout < < "sub   class   display " < <endl;
}
void   main()
{

student   a(10);
a.display();
}

------解决方案--------------------
student(int b)
{
person::person(b);
}

错了:
student(int b) :person(b)
{
}
------解决方案--------------------
person::person(b);
不能这样调用构造函数。 你看一下反汇编跟踪一下两次调用person构造函数(第一次调用了不带参数的,第二次应该就是你写的person::person(b);) 比较一下 Age地址就会发现两次赋值的地址是不同的.
------解决方案--------------------
class person
{
private:
int age;
public:
person();
~person();
person(int age);
void display();
};
void person::display()
{
cout < < "In Base Class,age= " < <age < <endl;
}
person::person()
{
this-> age=-1;
cout < < "Default constructor " < <endl;
}
person::~person()
{
cout < < "In Base Class,age= " < <age < <endl;
cout < < " deconstructor " < <endl;
}
person::person(int age)
{
this-> age=age;
cout < < "Argument " < <endl;
}
class student:public person
{
public:
student(int b)//这里相当于student(int b) :person()是调用无参数构造函数
{
person::person(b);
}
void display();