#include <stdio.h>

#include <stdlib.h>

#include <string.h>



typedef struct word{

char word[50];

struct Word * front;

struct Word * rear;

}Word;




void main(){




Word arr[100];

Word *ptr = &arr[0];//단어 배열 중앙에 위치할 포인터

int cnt=0;// 입력된 단어의 갯수

int temp;


while(1)

{

printf("단어를 입력하세요:");

scanf("%s",arr[cnt].word);//단어를 배열에 저장

if (cnt == 0)

{

arr[cnt].front = NULL;

arr[cnt].rear = NULL;

cnt++;

}

else if( cnt == 1)

{

if(strcmp( arr[cnt-1].word,arr[cnt].word) ==-1)

{

arr[cnt-1].front = &arr[cnt]; // 여기서 에러

}

else if(strcmp(arr[cnt-1].word,arr[cnt].word) == 1)

{

arr[cnt].front = &arr[cnt-1]; // 여기서 에러

}

}



}




system("pause");

}










실행시키면 Word*형식의 값은 Word* 형식의 엔터티에 할당할 수 없습니다 라는 오류뜨는데 


이거 왜안되는거임?

안될 이유가 없는것같은데


빡대가리라서 이해안감 .. 왜안되는거?


링크드리스트 만들라하는데