# include <stdio.h>
# include <conio.h>
# include <stdlib.h>


int main(int, char**);
void welcome_message(void);
void main_menu(void);
void second_menu(void);
void add_customer(void);
void edit_customer(void);
void print_report(void);
void cust_menu(void);
void exit_message(void);

int main(int argc, char *argv[])
{
    char menuOpt;
    int isExit = 0;
    if (argc > 1)
    {
             printf("%s : Start Up Error >>> ", argv[0]);
             fflush(stdin);
		     getch();
		     return (EXIT_FAILURE);
             }
             main_menu();
		     fflush(stdin);
		     menuOpt = (char)getch();
		     switch(menuOpt)
		     {
			case '1':
			 {
                 second_menu();
                 break;
             }
             case '2':
             {
                  isExit = 1;
                  break;
             }
             default:
             {
                     
                     printf("Invalid Option!");
                     fflush(stdin);
				     getch();
				     break;
                     }
              }
         }while(isExit == 0);
	     exit_message();
	     fflush(stdin);
	     getch();
         return (EXIT_SUCCESS);
}

void welcome_message(void)
{
     printf("WELCOME TO INSURANCE PROFESSIONAL!");
	 fflush(stdin);
	 getch();
}

void main_menu(void)
{
     
     printf("         ***INSURANCE PROFESSIONAL***\n\n");
     printf("                 [1] MENU\n\n");
     printf("                 [2] EXIT\n\n");
}

void second_menu(void)
{
     char menuOpt;
	 int isExit = 0;
	 do
	 {
         emp_menu();
		 fflush(stdin);
		 menuOpt = (char)getch();
		 switch(menuOpt)
		 {
                        case'1';
                        {
                        add_customer();
                        break;
                        }
                        case'2';
                        {
                        edit_customer();
                        break;
                        }
                        case'3';
                        {
                        print_report();
                        break;
                        }
                        case'4';
                        {
                        isExit = 1;
                        fflush(stdin);
				        break;
                        }
                        default:
                        {
                                printf("Invalid Choice");
                                getch();
                                }
                        }
                  }while(isExit == 0);
}

void add_customer();
{
     char first_name[30];
     char middle_name[30];
     char last_name[15];
     char address[60];
     int phone_number[8];
     int id[5];
     
     
     printf("First Name :");
     fflush(stdin);
     gets(first_name);
     printf("Middle Name :");
     fflush(stdin);
     gets(middle_name);
     printf("Last Name :");
     fflush(stdin);
     gets(last_name);
     printf("Address :");
     fflush(stdin);
     gets(address);
     printf("Phone Number :");
     fflush(stdin);
     gets(phone_number);
     printf("ID :");
     fflush(stdin);
     gets(id);
     fprintf(fp, "%s/%s/%s/%s/%s/%s \n", name, addresse, phone number, id);
     fflush(fp);
     fclose(fp);
     
     printf("Finish Entering Records ");
     getch();
}
     
     
void exit_message(void);
{     
 
 printf("THANK YOU!!\n");
 printf("GOOD BYE!!);
    
}

no, you won't get any help here.

you dont come in here and toss your wad of code on us and expect us to start cobbling away like your own little army of code elves.


.

What is your program suppose to do? What are you struggling with?
What kind of help do you need?

Those are pieces of information you should have advanced in order to obtain any meaningful help.

^ yeah, that's what i meant to say

Well its actually an insurance Program, and this is the first part, im doin it in modules but im getting a lot of errors...................
Its suppose to have a menu where u press a given number and it goes to the option choosen

what errors? from what code? what have you done to try and fix it?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.