Работа со списком - Error: dereferencing pointer to incomplete type - C (СИ)
Формулировка задачи:
Привет всем! Суть вопроса: имеются следующие структуры и функция, которая определяет место для вставки элемента, и в случае успеха возвращает указатель на предыдущий элемент:
Компилятор выдает ошибку и предупреждение для этой функции:
error: dereferencing pointer to incomplete type
warning: assignment from incompatible pinter type
Подскажите, как мне их исправить?
(На всякий случай полный код программы прилагается)
typedef struct INFO
{
unsigned int tab;
char FIO[25];
char type[10];
data god;
char last_r[15];
char new_r;
} info;
typedef struct NODE
{
info temp;
struct node *next;
} node, *pNODE;
typedef struct LIST
{
pNODE begin;
int len;
} list, *pLIST;pNODE getPointer(pLIST pL, char *b)
{
if(isEmpty(pL)) return NULL;
pNODE p=pL->begin;
if (strcmp(b,p->temp.FIO)<=0)
return p;
while (p->next!=NULL&&strcmp(b,p->next->temp.FIO)>0) //ошибка здесь(!)
p=p->next; // предупреждение здесь(!)
return p;
}Решение задачи: «Работа со списком - Error: dereferencing pointer to incomplete type»
textual
Листинг программы
typedef struct NODE
{
info temp;
struct node *next;
} node, *pNODE;