Hi,
I am having some trouble creating a data type to be used in more than one file. I would just like some clarification on this.
I know this works:
The problems arise when I want to use this another file which we'll call funcs.c and of course funcs.h. I'm going to be passing a Customer from the main program to one of the functions declared in funcs.c, now the problem is: where do I declare this typedef. I originally tried in both the c files and ran into some compile warnings in the h file. When declaring this in the h file, that gave some more warnings. If anyone can help me out, it would be much appreciated. Thanks.Code:typedef struct { char ID[10]; char *name; unsigned int num; char *address; char phoneNumber[10]; } Customer; Customer new_cust[10]; // create array of 10 customers