struct book{
char title[50];
int page;
int price;
};
int main(void)
{
struct book mybook;
}
struct{
char title[50];
int page;
int price;
}mybook;
typedef 새로운 이름으로 바꿔준다 ㅋ
구조체 포인터
struct univ{
char title;
int student;
};
struct univ ku={"한국대학교",5000};
struct univ *ptr=&ku;
ptr->title , ptr->student;
(*ptr).title , (*ptr).student
이렇게 써줘야 한다
char title[50];
int page;
int price;
};
int main(void)
{
struct book mybook;
}
struct{
char title[50];
int page;
int price;
}mybook;
typedef 새로운 이름으로 바꿔준다 ㅋ
구조체 포인터
struct univ{
char title;
int student;
};
struct univ ku={"한국대학교",5000};
struct univ *ptr=&ku;
ptr->title , ptr->student;
(*ptr).title , (*ptr).student
이렇게 써줘야 한다
'프로그래밍 > c' 카테고리의 다른 글
visual studio 라인넘버 (0) | 2014.12.10 |
---|---|
error LNK:1123 COFF로 변환하는 동안 오류가 발생했습니다 (0) | 2013.05.23 |
포인터 (0) | 2012.01.05 |
c로 배우는 프로그래밍 기초 4장 연습문제 (0) | 2012.01.02 |
간단정리 (0) | 2012.01.02 |