unions

    2

    2답변

    저는 꽤 이해할 수없는 코드가 있습니다. typedef double Align; union header{ struct{ union header *ptr; unsigned int size; }s; Align x; }; typedef union header Header; 그래서이 유니온을 생성 한 후에는

    0

    3답변

    나는 fallowing 구조체가 : struct lshort_sched_param { int requested_time; int level; }; struct sched_param { union { int sched_priority; struct lshort_sched_param lshort_params

    1

    2답변

    노동 조합을 사용하여 혼란 스럽습니다. 다른 방법으로 시도해 보았습니다. 실패했습니다. memcpy(data_u, info, sizeof(data_u)); memcpy(&data_u, info, sizeof(data_u)); memcpy(data_u.Umember_a, info, sizeof(data_u)); memcpy(data_u.Umember_a

    0

    2답변

    현재 임베디드 코드 포트 (Freescale S12)에서 작업 중이므로 GNU와 나는 노동 조합에 문제가 있습니다. 난 다음 노동 조합 typedef signed short sint16; typedef signed long sint32; typedef union { sint32 Akku; sint16 AkkuHigh;

    0

    1답변

    각 인스턴스화에는 멤버에 독점적으로 의존하는 핸들이있는 클래스를 구현하고 있습니다. type. 다른 유형은 다른 핸들과 연관됩니다. 타입은 타입 TypeB 경우 TypeA는 handleB 존재하고, 타입 TypeC 경우 handleC 존재한다면 enum class Type { TypeA, TypeB, TypeC; }; class HandleA

    0

    1답변

    Python에서 완전한 멍청한 질문이므로 여기에서이 질문을하는 것이 맞는지 확실하지 않습니다. Grey Hat Python에 대한 지침을 따르고 있으며 유니 코드 코딩 작업을하고있었습니다. 이 원래의 코드 from ctypes import * class barley_amount(Union): _fields_ = [ ("barley

    0

    1답변

    필자는 상태에 따라 서로 다른 결과 집합을 저장해야하는 임베디드 시스템을 보유하고 있습니다. typedef struct { union { struct { double Val1; double Val2; } State1; struct { double

    6

    1답변

    이것은 POD structs containing constant member과 비슷하지만 일종의 반대입니다. #include <iostream> struct A { int a; }; union U { volatile A a; long b; }; int main() { U u1; U u2;

    4

    1답변

    내가 가진 조합 :이 union{ UCHAR *_rawData; RGB *_RGBData; }; typedef struct RGB { UCHAR red; UCHAR green; UCHAR blue; }RGB; 나중에 코드에서 ... _rawData = new UHCAR[126]; _RGBData =

    1

    1답변

    유니온 구성원이 메모리 공간을 공유한다는 것을 알고 있으므로 다음 코드가 9 & 9를 출력 할 것으로 기대합니다. 그러나 12 & 9. 왜? union Sample_union { int x; char array [9]; }; int main(){ Sample_union sample; cout<<sizeof(sample