Ver Mensaje Individual
  #2 (permalink)  
Antiguo 27/05/2009, 09:20
haidion
 
Fecha de Ingreso: febrero-2004
Ubicación: Buenos Aires
Mensajes: 60
Antigüedad: 21 años
Puntos: 0
Respuesta: Ayuda con codigo sencillo en c++

Prueba usando la funcion strtok como en el siguiente ejemplo

Código c++:
Ver original
  1. char fecha[]="12/2/99";
  2. char *ptr;
  3. int dia,mes,ano;
  4.      
  5. ptr=strtok(fecha,"/");
  6. dia=atoi(ptr);
  7. ptr = strtok( NULL, "/" );
  8. mes=atoi(ptr);
  9. ptr = strtok( NULL, "/" );
  10. ano=atoi(ptr);

Espero que te ayude