Basic/C
구조체 3가지 형식
가누
2015. 3. 7. 14:43
반응형
1 2 3 4 5 6 7 8 9 10 11 | struct student { int num; char name[10]; int classs; }; struct student box1; //기본적인 사용법 | Crocus |
=============================================================
1 2 3 4 5 6 7 8 9 | struct student { int num; char name[10]; int classs; }box1; //구조체를 선언과 동시에 지정 | Crocus |
==============================================================
typedef 이용법
1 2 3 4 5 6 7 8 9 10 11 | typedef struct student { int num; char name[10]; int classs; }ABC; //구조체에 별명을 지어준다. ABC box1; | Crocus |
반응형