C
charles
when i read the notable book of inside the c++ bject model ,i was
confused by the chapter 3.3. i was confused by the statement as follow:
chaper 3.3:
Given the following pair of program statements:
Point3d origin; .....Access of a nonstatic data member requires the addition
of the beginningaddress of the class object with the offset location of the
data member.For example, givenorigin._y = 0.0; the address of&origin._y; is
equivalent to the addition of&origin + ( &Point3d::_y - 1 ); i don't
understand why the address of object of origin is compute by the
this : &origin + (&Point3d::_y -1 ) ;
especially for &Point3d::_y ,it is what ?
thanks for any clue?
regards
coco
confused by the chapter 3.3. i was confused by the statement as follow:
chaper 3.3:
Given the following pair of program statements:
Point3d origin; .....Access of a nonstatic data member requires the addition
of the beginningaddress of the class object with the offset location of the
data member.For example, givenorigin._y = 0.0; the address of&origin._y; is
equivalent to the addition of&origin + ( &Point3d::_y - 1 ); i don't
understand why the address of object of origin is compute by the
this : &origin + (&Point3d::_y -1 ) ;
especially for &Point3d::_y ,it is what ?
thanks for any clue?
regards
coco