This is a function in the program I'm working with:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
void hacerReserva(int **av, int fil, int col)
{
int f,c, dni;
cout << "Dar Fila y Asiento:?";
cin >> f >> c;
if (av[f-1][c-1] !=0){
cout<<"Asiento ocupado, seleccione otro por favor"<<endl;
}
else{
cout << "Dar DNI(sin letra)";
cin >> dni;
av[f-1][c-1] = dni;
}
}
when this is true-->if (av[f-1][c-1] !=0)I want the program to go back to the top to start the function again. This is a program that contains a menu and with the program the way it is right now when this condition is true it just goes back to the menu and asks the user to select an option. However I dont want this, because I dont want to get out of this function until the condition its not true so that everything that is at the end of the function happens. How can I do this the easiest way?? HELP PLEASE, THANK YOU!!!