use of vectors [closed]

2

I need to register a number of people entered by the user, search for them and then show them, but I do not know how to look for that information and how to show it. I did a function buscar_datos and mostrar_datos .

void ingresar_datos(){
    cout<<"Ingrese el numero de usuarios que desea registrar"<<endl;
    cin>>repetir;system("cls");

    for( x=0;x<repetir;x++){
      cout<<"\tINGRESE LOS DATOS DEL USUARIO:"<<endl;
      cout<<"1.-Ingrese el Nombre: ";
      cin.getline( per[x].nombre,200);

      cout<<"2.-Ingrese el Apellido: ";
      cin>>per[x].apellido;

      cout<<"3.-Ingrese el codigo del numero de telefono: ";
      cin>>per[x].telefono;

      if(per[x].telefono==a||per[x].telefono==b||per[x].telefono==c||per[x].telefono==d||per[x].telefono==e){
        cout<<"3.1-Ingrese el resto del numero de telefono: ";
        cin>>per[x].telefono2;  
      }else{
        cout<<"ERROR - INGRESO UN CODIGO INCORRECTO"<<endl;
        exit(1);
      }

      cout<<"4.-Ingrese el codigo del numero Celular: ";
      cin>>per[x].celular;            

      if(per[x].celular==f||per[x].celular==g||per[x].celular==h||per[x].celular==i||per[x].celular==j){
        cout<<"4.1.-Ingrese el resto del numero: ";
        cin>>per[x].celular2;   
      }else{
        cout<<"ERROR - INGRESO UN CODIGO INCORRECTO"<<endl;
        exit(1);
      }

      cout<<"5.-Ingrese el correo electronico: ";
      cin>>per[x].correo;
      cout<<"6.-Ingrese la Ciudad: ";
      cin>>per[x].ciudad;   
      cout<<"7.-Ingrese el Pais: ";
      cin>>per[x].pais;

      do {                                          
        cout<<"\tSE HAN CARGADO LOS DATOS CORRECTAMENTE"<<endl;
      }while(per[x].pais == "venezuela");   
    }
  }
    
asked by Luis 08.11.2017 в 03:44
source

0 answers