从“CSon *”到“CFather *”的变换存在,但无法访问,why

从“CSon *”到“CFather *”的转换存在,但无法访问,why?
代码如下,问题如题,求讲解,谢谢大家


C/C++ code

#include <iostream>
using namespace std;

class CFather
{
private:
    int age;
public:
    int money;
public:
    CFather()
    {
    }
    ~CFather()
    {
    }
};


class CSon:CFather
{
public:
    CSon()
    {
    }
    ~CSon()
    {
    }
};

int main()
{
    CFather *son = new CSon;
    system("pause");
    return 0;
}



------解决方案--------------------
class CSon:public CFather
------解决方案--------------------
因为CSON的构造函数进不去
------解决方案--------------------
探讨

引用:

引用:

引用:

class CSon:public CFather


私有继承为什么不能New?


我没说不能用, 你的代码少public,看不出来?


我知道我没写public啊,但是默认是私有继承啊,我是问为什么私有继承的时候就不能New一个对象。。。