程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> C語言 >> C++ >> C++入門知識 >> 從匯編看c++中指向成員變量的指針(一)

從匯編看c++中指向成員變量的指針(一)

編輯:C++入門知識

 

    _x}
     _y}
     _z
   Y y   Z z   y._y =    z._x =    z._y =    z._z =  :*xmp1 = &:_x :*ymp1 = &:_y :*zmp1 = &:_x    :*zmp2 = &:_y    :*zmp3 = &:_z   cout <<  << endl   cout <<  << sizeof(xmp1) << endl   cout <<  << sizeof(ymp1) << endl   cout <<  << sizeof(zmp1) << endl   cout <<  << sizeof(zmp2) << endl   cout <<  << sizeof(zmp3) << endl << endl   printf(, &:_x)   printf(, xmp1)   cout <<  << endl   printf(, &:_y)   printf(, ymp1)   cout <<  << endl   printf(, &:_x)   printf(, &:_y)   printf(, &:_z)   printf(, zmp1)   printf(, zmp2)   printf(, zmp3)   cout <<  << endl   cout <<  << endl   z.*xmp1 = 
   cout <<  << x.*xmp1 << endl   cout <<  << z.*xmp1 << endl   cout <<  << x._x << endl << endl   zp->*xmp1 =    cout <<  << x.*xmp1 << endl   cout <<  << zp->*xmp1 << endl   cout <<  << x._x << endl   cout <<  << z._x << endl << endl   cout <<  << endl   z.*ymp1 =    cout <<  << y.*ymp1 << endl   cout <<  << z.*ymp1 << endl   cout <<  << y._y << endl   cout <<  << z._y << endl << endl   zp->*ymp1 =    cout <<  << y.*ymp1 << endl   cout <<  << zp->*ymp1 << endl   cout <<  << y._y << endl   cout <<  << z._y << endl << endl   X* xp = zp   xp->*xmp1 =    cout <<  << x.*xmp1 << endl   cout <<  << xp->*xmp1 << endl   cout <<  << x._x << endl   cout <<  << z._x << endl   yp->*ymp1 =    cout <<  << y.*ymp1 << endl   cout <<  << yp->*ymp1 << endl   cout <<  << y._y << endl   cout <<  << z._y << endl  

   

 z.*ymp1 = ;
 zp->*ymp1 = ;


        DWORD PTR _zp$[ebp], 
        SHORT $LN11@main
        eax, DWORD PTR _zp$[ebp]
        eax, 
        DWORD PTR tv519[ebp], eax
        SHORT $LN12@main
$
        DWORD PTR tv519[ebp], 
$
        ecx, DWORD PTR tv519[ebp]
        ecx, DWORD PTR _ymp1$[ebp]
        DWORD PTR [ecx], 


        edx, DWORD PTR _z$[ebp]
        edx, edx
                    
        eax, 
    
        DWORD PTR tv410[ebp], 
        DWORD PTR [ecx], 

 

 zmp2 = ymp1;

 


        DWORD PTR _ymp1$[ebp], -
        SHORT $LN13@main
        DWORD PTR tv532[ebp], -
        SHORT $LN14@main
$
        edx, DWORD PTR _ymp1$[ebp]
        edx, 
              
              
        DWORD PTR tv532[ebp], edx
$
        eax, DWORD PTR tv532[ebp]
        DWORD PTR _zmp2$[ebp], eax

 

 

 

 

 

 

 

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved