로딩
요청 처리 중입니다...

C언어_자료구조_큐_리스트형태

 C언어_자료구조_큐_리스트형태

#include #include int dat; struct head{ struct que* front; //front는 처음 들어간 데이터 위치 struct que* rear; //rear 은 최근에 들어간 데이터 위치를 가리킨다. }; struct que{ //que를 담는 구조이다. int data; struct que* next; }; void que_init(struct head* h){ //que를 초기화 해준다. h->front=NULL; h->rear=NULL; } void enque(struct head* h, int data){ //que에 데이터가 들어가는 함수이다. struct que* newn= (struct que*)malloc(sizeof(struct que)); newn->data=data; newn->next=NULL; if(h->front==NULL){ //데이터가 초기화 값, 빈상태일 경우 h->front=new...

# include