"When the sizeof operator is applied to a class, struct, or union type, the result is the number of bytes in an object of that type, plus any padding added to align members on word boundaries. The result does not necessarily correspond to the size calculated by adding the storage requirements of the individual members. The /Zp compiler option and the pack pragma affect alignment boundaries for members." © MSDN All rights reserved
Отправлено
DASM 21 августа 2009, г. 12:49
В ответ на:
уточнение: sizeof показывает размер в char'ах, а не в байтах. Разница будет, если char двухбайтный отправлено пользователем
Каа 21 августа 2009, г. 12:43