i get a undefined reference to get_menu_choice error message but i dont know why ?

int get_menu_choice( void); 

int main() 
{ 
//code// 


while (choice != QUIT)
	{
		choice = get_menu_choice();
		
		if (choice == 1)
                //code//
}
else
                if (choice == 2)
                //code//
}
              if (choice == 3){ 
		puts("you chose to quit\n");
		return 0;
}
int get_menu_choice( void )
	{
	int select = 0; 
	do
		{
		printf("\n");

		printf("\n1 - open file\n");
		printf("\n2 - add a file\n");
		printf("\n3 - Quit");
		printf("\n");
		printf("\nEnter a selection: " );
		scanf("%d", &select); 
		}
		while (select < 1 || select > 3) ;
		return select; 
		}

Why? Because the posted code is full of errors.

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.