???????????????C++????????????????????????????????????????C++???????C++??????????????и?NOIP???????????STL????????C++?????????????????????????????????и?NOIP?????C++???????c??????cout??cin??

????????????????????????????????????ЩC++???????????????????????????????????????????????????????????????????????????????????????????????????????C++????????????????????????????C++????????

?????????

??????????????????????????п????????????μ????

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

1: class Father
2: {
3:     int iA_;
4:     int iB_;
5:
6:     void FuncA();
7:     void FuncB();
8: };
9:
10: class Child : Father
11: {
12:     int iC_;
13:     void FuncC();
14: };

???????Father??????????? (???? –> ????) : iA_??iB_????????Father??????С??8????????????????????????

???????????

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

????????????????????????????λ?????????????????????????? call ???????(???)????????????????????????????( ?????????λ??????? )??

???????????????????????????????????????????????飬???ж????????????е????????????“???”????????????????????????????????“???”????????????????????????????????????

????????????????С???????????????????????????????????????????????????????????????????????????????????

????this???

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

??????????????????????????????????????????????λ????????????

??????????п???????this???????????????????????????????

????????????????????????????????????????????????????ecx?????????????????????this???

??????????????????????????дthis?????????????????????????????????????????“????”??

??????л???

??????????????????????????????????ж???????????????????????????????????????????????е?????????з??????????????

1: #include <stdio.h>
2:
3: class Exp
4: {
5:     int iA_;
6:     int iB_;
7:
8: public:
9:     Exp()
10:     {
11:         iA_ = iB_ = 0;
12:     }
13:     void Out()
14:     {
15:         printf("%d %d "??iA_??iB_);
16:     }
17: };
18:
19: int main()
20: {
21:     Exp oA;
22:     void *pC = &oA;
23:
24:     oA.Out();
25:     *(int*)pC = 1;
26:     *(int*)((int)pC+4) = 2;
27:     oA.Out();
28:
29:     return 0;
30: }

?????????? 0    0
???????????? 1    2

??????? iA_??iB_????е??????????????????????????????????????????£?????? oA.iA_ = 1 ???????????