????????????????

???????????????????????????????Щ?????????????Щ???????

??????????????

1: void Test( Father oP )
2: {
3: }
4:
5: int main()
6: {
7:     Father oA;
8:     Test(oA);
9:     return 0;
10: }

????????????????????

?????????

??????????????????????C++????????????????????й??????????????????????????????????????????????????????????????????????????ж????????????????????????????????????“???”??( ?????????????????????????????????? )

??????У?

????????沼????????

1: struct Child : Father

??????

1: struct Child
2: {
3:     Father o;
4:     //other
5: };

??????????麯???????????????????????沿??????????????

??????????????? Father * ???????????????? Child *????????????????????

?????? Father & ??????????????????? Child &???????з???public??But ?? why ??

????protected??private????????????е???????????????????????????Father &???????????е?????????????????????????????Υ???????????????ж??????????????

?????麯????

??????????????????

????Question?????????麯????

???????????????????????????麯??????????????????й?????????C++primer????????????????????????????????

?????麯????????????2????????????±????????

??????????????麯??????????麯???????????????????????????????????????????????????????????PS?????????????????

?????????????????????????????汾??????????????????? Father *?????????Child??????????麯????Child???

???????????????????????????

1: class Child : Father
2: {
3:     int iC_;
4:     void FuncC();
5:     virtual void VF();
6: };