elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Guía rápida para descarga de herramientas gratuitas de seguridad y desinfección


+  Foro de elhacker.net
|-+  Programación
| |-+  Programación C/C++ (Moderadores: Eternal Idol, Littlehorse, K-YreX)
| | |-+  Ayuda por favor un error
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: Ayuda por favor un error  (Leído 1,249 veces)
MellaSystems

Desconectado Desconectado

Mensajes: 46



Ver Perfil
Ayuda por favor un error
« en: 19 Mayo 2015, 03:22 am »

Tengo esta funcion amigos, antes de uso un deque<cEstudiante> dEstudiante

Código
  1. void eliminar_estudiante(){
  2.    int cont = -1;
  3.    char op;
  4.    string matricula;
  5.    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), Color_Yellow);
  6.    cout<<"      ---------------------------------------------------------------------\n";
  7.    cout<<"             <<<<<<<<<<     ESTUDIANTES->ELIMINAR        >>>>>>>>>>";
  8.    cout<<"\n      ---------------------------------------------------------------------\n";
  9.    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), Color_Def);
  10.    cout<<endl;
  11.    cout<<"\n\tELIMINAR UN ESTUDIANTE";
  12.    cout<<"\n\n\tIngrese la posici\242n:"; cin>>matricula;
  13.    for(it=dEstudiante.begin(); it!=dEstudiante.end(); ++it){
  14.        cEstudiante PrintEstudiante = *it;
  15.            if((*it) == matricula){      
  16.  dEstudiante.erase(find(dEstudiante.begin(),dEstudiante.end(), matricula));
  17.   deque<dEstudiante>::iterator itTemp = --it;
  18.               cont++;  
  19.               cout<<"\n\n\tREGISTRO ELIMINADO...!!!!!\n";    
  20.               }
  21.               } if (cont == -1){
  22.                       cout<<"\n\tMATRICULA INCORRECTA...!!\n";
  23.               }cont = -1;
  24.        do{
  25.  
  26.        cout<<"\n\n\tDesea seguir eliminando? <S/N>: ";
  27.        cin>>op;
  28.        switch(op){
  29.            case 's':   system("cls");
  30.                        eliminar_estudiante();
  31.                        break;
  32.            case 'S':   system("cls");
  33.                        eliminar_estudiante();
  34.                        break;
  35.            case 'n':   return ;
  36.  
  37.            case 'N':   return ;
  38.  
  39.            default: cout<<"\n\t Ingrese una opcion valida";
  40.            }
  41.    }while(op=='y'||op=='Y');
  42. }

Me da error:
265 C:\Users\JuanaG\Programacion\Estructura de Datos\DataBases.cpp no match for 'operator==' in '(&it)->std::_Deque_iterator<_Tp, _Ref, _Ptr>::operator* [with _Tp = cEstudiante, _Ref = cEstudiante&, _Ptr = cEstudiante*]() == matricula'


En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
error de video ayuda por favor
Multimedia
AKUARIUS23 1 1,869 Último mensaje 25 Noviembre 2004, 06:30 am
por Songoku
ERROR con el Foro POr favor Ayuda « 1 2 »
Sugerencias y dudas sobre el Foro
Embusterillo de bolsillo 11 4,786 Último mensaje 5 Marzo 2007, 21:28 pm
por
ayuda por favor error
Programación C/C++
stevengvr 1 1,379 Último mensaje 26 Junio 2015, 17:35 pm
por engel lex
android/meterpreter/reverse_tcp error por favor ayuda
GNU/Linux
log015 0 2,306 Último mensaje 24 Agosto 2017, 02:08 am
por log015
Error con el comando wash -i ¿Alguna ayuda? Por favor
Wireless en Linux
dellted 3 2,796 Último mensaje 11 Abril 2018, 02:17 am
por BloodSharp
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines