I get these two areas in my add function:
Borland C++ 5.5 for Win32 Copyright (c) 1993, 2000 Borland
linklistportion.c:
Error E2450 linklistportion.c 23: Undefined structure 'LIST' in function add
Error E2109 linklistportion.c 23: Not an allowed type in function add
Code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct data{
char ip[16];
char user[30];
struct data *next;
};
typedef struct data LIST;
typedef LIST *LINK;
LINK add(char *ipaddr, char *username, LINK first);
char *getuser(char *ipaddr, LINK first);
void freel(LINK first);
LINK add(char *ipaddr, char *username, LINK first)
{
LINK new=NULL;
LINK tmp=NULL;
LINK prev=NULL;
new = (LINK)malloc(sizeof(struct LIST));
if ( !new ){
printf("Unable to allocate memory");
exit(-1);
}