나는이 headerfile 및 C-파일이 :구조체가 포함 된 공용체는 어떻게 사용합니까?
code.h :
typedef struct types *someType;
typedef struct {
int thirdint;
int otherint;
int someint;
} thing, *Thing;
typedef union {
otherthing otherthing;
thing thing;
} types;
code.c :
someType thestruct;
(thing)thestruct->someint = 1;
나는이 작동 할 것이라고 생각하지 않는다, 그것은 무엇입니까? 나는이 코드를 과제의 일부로 받았고, 이것이 나를 오류가되게하는지 모른다.
'SomeType'과'someType'은 같은 의미입니까? – chux
예, 오타를해서 유감입니다! – theva