구조체초기화

· Language/C++
Structure variable struct book{ char title[50]; char autor[50]; char subject[100]; int book_id; }; struct book book1; book은 구조체의 type 이름이며, book1은 book 구조체 타입을 가지는 변수이다. book1.book_id = 0; book의 구조체 타입을 가진 book1의 member에 접근하고 싶을 때 member access operation "."을 붙여서 member name을 선택한다. typedef typedef unsigned int MyType; typedef을 사용함으로써 새로운 이름을 가진 타입을 줄 수 있다. typedef and struct struct point { int x..
행복한쿼콰
'구조체초기화' 태그의 글 목록