typedef struct

{

char vertex;

struct Node* next;

} Node;


Node* adjList[MAX_VERTEX];


int checkEdge(char from, char to)

{

Node* search = adjList[from - 65];


while (search)

{

if (search->vertex == to)

return TRUE;

search = search->next;

}

return FALSE;

}



C파일에서는 에러없이 잘 돌아가지만

CPP파일에서는 밑에 설명과 같은 에러가 발생합니다.

search = search->next; 에서 Node* 형식의 값을 Node* 엔터티에 할당 할 수 없습니다.

라는 에러 메시지가 뜹니다.


typedef struct _Node* nodeptr;

typedef struct _Node

{

char vertex;

nodeptr next;

} Node;


그래서 이렇게 고쳤더니 해결됐는데


typedef struct

{

char vertex;

struct Node* next;

} Node;


typedef struct _Node* nodeptr;

typedef struct _Node

{

char vertex;

nodeptr next;

} Node;


이 두개가 차이가 있는건가요??