C와 C ++에서 연합의 목적
나는 이전에 편하게 노동 조합을 사용했다. 오늘 이 게시물을 읽었을 때 놀랐 으며이 코드를 알게되었습니다. union ARGB { uint32_t colour; struct componentsTag { uint8_t b; uint8_t g; uint8_t r; uint8_t a; } components; } pixel; pixel.colour = 0xff040201; // ARGB::colour is the active member from now on // somewhere down …