I need help doing a menu driven database program. I need a Main Menu, with a few options. One of the options is to create a new record in a table. Can anyone help me go from a main menu screen to the actual database to create a new entry?
Thanx! :D
Printable View
I need help doing a menu driven database program. I need a Main Menu, with a few options. One of the options is to create a new record in a table. Can anyone help me go from a main menu screen to the actual database to create a new entry?
Thanx! :D
Code:do{
printf("1. Make a new database\n");
printf("2. Add a person\n");
printf("3. Remove a person\n");
/*blah blah blah*/
fgets(buffer,sizeof buffer,stdin);
while(buffer[0]!=1|| buffer[0]!=2|| buffer[0]!=3);
if(buffer[0]==1)
add_database();
/*blah blah rest of code*/
> buffer[0]!=1
Should be
buffer[0]!='1'
you knew what I meant :D
Thanx :D