小编Dav*_*ide的帖子

C struct元素对齐(ansi)

只是一个简单的问题......关于结构成员对齐的标准是什么?例如,这个:

struct
{
    uint8_t a;
    uint8_t b;
    /* other members */
} test;
Run Code Online (Sandbox Code Playgroud)

保证b与struct start的偏移量为1?谢谢

c c++ standards ansi memory-alignment

4
推荐指数
1
解决办法
489
查看次数

标签 统计

ansi ×1

c ×1

c++ ×1

memory-alignment ×1

standards ×1