You're going about making this program, the wrong way.
What you want to do is start with the essential thing - your struct, and get it set up. Will one struct be enough to hold several members data?
No. So you need an array of these structs. Get that first.
Then start with ONE function, and get it working, then add another function, and get it working, etc.
Big mistake to start on several functions, get a lot of code done, and then find out OOPS! 90% of it is not right, and has to be thrown out, and re-done.
Here's your program with several suggestions in it. No, it does not work, these are suggestions to get rid of obvious errors, only.
Why don't you start with adding a very small members of say 4, and put in three names, initially. Then in the functions that change the members data, you need to pass the address to the members array.
int f_menu (void);
void f_add(DATABASE members);
//void main() //int main and with a return, please
int menu = 0;
//menu = f_menu (DATABASE);
//DATABASE is an alias for a struct, only.
menu = f_menu();
case 1 :
case 2 :
case 3 :
} while (menu != 3);
menu = getchar();
//int f_menu (DATABASE members) You don't need members in f_menu, at all.
int menu = 0;
printf("\n\nLeisure Center Menu\n");
printf(" 1. Add Members\n 2. Display Members\n 3. Exit\n ");
printf("\nEnter choice: ");
/* You can't flush your kitchen sink, just your toilet */
if((menu < 1 ) || (menu > menu))
printf("Invalid choice. Try again: ");
} while ((menu < 1 ) || (menu > menu));
/*DATABASE is just an alias for a struct name. It's not "something"
to be passed to any function. You want "members", instead.
void f_add(DATABASE members)
printf("Enter member ID : ");
printf("Enter first name : ");
printf("Enter surname : ");
printf("Enter membership type : ");
//NOW c'mon! :)
// fflush(stdin); //quit trying to flush the kitchen sink!
printf("Enter memership expiry month (1-12) : ");
//no return needed
void f_display(DATABASE members)
The above gives no errors, but doesn't work either - it's just a step up.