Good afternoon, I have an exercise in which at first I ask for the Name and Certificate of a Person, I store them in a vector and run the program, with other calculations that I do. The case is that in the end develop a menu with several options, one of them is the list of all those people with their names and cedulas, the other option is that from a cedula ( data that I requested at the beginning), show me the data of that person .
The code where I ask for the data
for (i = 0; i < 2; i++)
{
system("cls");
total_mensual[i] = 0;
sueldo_mensual[i] = 0;
seguro[i] = 0;
bono_mensual[i] = 0;
sueldo_semana_total[i] = 0;
cout<<"< = = = = = F A B R I C A de F O R R O S para V E H I C U L O S = = = = = >";
cout<<"\n\nIngrese el Nombre del Trabajador: "<<i<<". ";
cin>>nombre[i];
cout<<"\nCedula del Trabajador: ";
cin>>cedula[i];
The part of the menu where I want the data to be sent to me with the ID card
case 2:
system("cls");
cout<<"< = = = = = F A B R I C A de F O R R O S para V E H I C U L O S = = = = = >";
cout<<"\n\nOpcion 2: Consulta de Datos por Cedula";
cout<<"\n\nIngrese el Numero de Cedula: ";
//Aqui ingreso la cedula, y luego deberia arrojarme los datos de la persona (nombre y cedula).
break;