Tema: std::string
Ver Mensaje Individual
  #5 (permalink)  
Antiguo 27/09/2010, 10:45
stiwi222
 
Fecha de Ingreso: noviembre-2009
Mensajes: 186
Antigüedad: 14 años, 5 meses
Puntos: 2
Respuesta: std::string

si, aqui esta:
Código C++:
Ver original
  1. void cruce(string &hijo1, string &hijo2){
  2.  
  3.     int punto = (int) (NUM_ALE*TASA_CRUCE);
  4.  
  5.     string t1, t2;
  6.  
  7.     t1=hijo1.substr(0, punto) + hijo2.substr(punto+1, LON_CROMO);
  8.     t2=hijo2.substr(0, punto) + hijo1.substr(punto+1, LON_CROMO);
  9.  
  10.     hijo1=t1; hijo2=t1;
Muchas gracias