What I'm trying to do is creating a structure array and pass it to a function. My function takes it as a pointer. But I'm having lots of errors which makes me mad. My deadline is approaching and still I've been trying to sort out what the problem is (for 4 hours now).
Here is my code:
typedef struct node{
struct node *next;
char *word;
int wcnt;
}NODE;
typedef struct list{
struct node *head;
int counter;
}LIST;
void fillNode(LIST *lst[26]);
void createList(LIST *lst[26]);
NODE *createNode(char *word);
void insertEnd(LIST *lst[26], char *word, int num);
int main()
{
LIST myList[26];
lower();
createList(&myList);
fillNode(&myList);
}
Compiling...
main.c
C:\Users\Shadow Shooter\Projects\string1\odev\main.c(26) : warning C4047: 'function' : 'struct list ** ' differs in levels of indirection from 'struct list [26]'
C:\Users\Shadow Shooter\Projects\string1\odev\main.c(26) : warning C4024: 'createList' : different types for formal and actual parameter 1
C:\Users\Shadow Shooter\Projects\string1\odev\main.c(27) : warning C4047: 'function' : 'struct list ** ' differs in levels of indirection from 'struct list [26]'
C:\Users\Shadow Shooter\Projects\string1\odev\main.c(27) : warning C4024: 'fillNode' : different types for formal and actual parameter 1
main.obj - 0 error(s), 4 warning(s)