[an error occurred while processing this directive]
|
#pragma pack(1)
typedef struct {
char b;
unsigned i;
} MY_STR;
#pragma pack()void Foo (unsigned *pch)
{
*pch = 0x12345678;
}int main()
{
STR str = {0, 0};
Foo(&str.i);
return 0;
}
Но в симуляторе у Вас пройдет все нормально, он не учитывает "отсечение" младших бит в процессоре
Составить ответ ||| Конференция ||| Архив
Ответы
E-mail: info@telesys.ru