Retrieves the offset of a member
from the beginning of its parent structure.
size_t offsetof(
structName,
memberName
);
Parameters
structName
Name of the parent data structure.
memberName
Name of the member in the parent data structure for which to determine the
offset.
Return Value
offsetof returns the offset in bytes of the specified member from the beginning
of its parent data structure. It is undefined for bit fields.
Remarks
The offsetof macro returns the offset in bytes of memberName from the beginning
of the structure specified by structName. You can specify types with the struct
keyword.
Note
offsetof is not a function and cannot be described using a C prototype.
榪欎釜鍋氭硶鐨勫閥濡欎箣澶勫氨鏄細瀹冩妸“0”浣滀負涓婁緥涓殑pAAA,閭d箞 &(pAAA->j)灝辨槸j鐨刼ffset鍟︺?br>
瑙f瀽緇撴灉鏄細
(s *)0 ,灝?0 寮哄埗杞崲涓篜ointer to "s"
鍙互璁?pS = (s *)0 錛宲S鏄寚鍚憇鐨勬寚閽堬紝瀹冪殑鍊兼槸0;
閭d箞pS->m灝辨槸m榪欎釜鍏冪礌浜嗭紝鑰?amp;(pS->m)灝辨槸m鐨勫湴鍧錛岃屽湪鏈緥涓氨鏄痮ffset鍟?
]]>VS2005鏃犳硶榪涜DEBUG錛欱inary was not build with debug information.http://www.shnenglu.com/lovedday/archive/2007/07/01/27343.htmlloveddayloveddaySun, 01 Jul 2007 15:16:00 GMThttp://www.shnenglu.com/lovedday/archive/2007/07/01/27343.htmlhttp://www.shnenglu.com/lovedday/comments/27343.htmlhttp://www.shnenglu.com/lovedday/archive/2007/07/01/27343.html#Feedback1http://www.shnenglu.com/lovedday/comments/commentRss/27343.htmlhttp://www.shnenglu.com/lovedday/services/trackbacks/27343.html Its not an installation issue, the problem is, as the error message suggests, that you have not built your project with debug information.
To do this: 1) Goto Project->Properties 2) Make sure "Configuration" at the top is "Debug" 3) On the left, select "C/C++", then "General" 4) On the right, change "Debug information format" to "Program Database for edit and continue (/ZI)" 5) On the left, Select "Optimization" 6) On the right, Change "Optimization" to "Disabled (/Od)" 7) On the left, select "Code Generation" 8) On the right, change "Runtime library" to "Multi-Threaded Debug (/MTd)" 9) On the left, expand "Linker" and select "Debugging" 10) On the right, change "Generate Debug info" to "Yes (/DEBUG)" 11) Rebuild your project.