{
public:
float money;
son1( )
{
money=father1::money*0.6;
father1::money=father1::money- money;
cout << "son1 father1 money="<
};
class son2:public father1
{
public:
float money;
son2( )
{
cout << "son2 father1 money="<
}
};
class grandson:public son1
{
public:
float money;
grandson( )
{
cout << "grandson father1 money="<
son1::money=son1::money-money;
cout << "grandson money="<< money<< endl;
cout << "grandson son1 money="<< son1::money<< endl;
}
};
沒有留言:
張貼留言