c & c++/구조체1 구조체(struct) #include //사용자 정의 자료형 typedef struct _tagMyST //typedef = type을 재정의함 { int a; float f; }MYST; typedef struct _tagBig { MYST k; //내가 만든 자료형으로 다른 구조체에 선언 가능 int i; char c; }BIG; int main(void) { MYST t; t.a = 10; t.f = 10.2121f; int iSize = sizeof(MYST); // int + float = 8byte return 0; } 2022. 7. 18. 이전 1 다음