Ver Mensaje Individual
  #10 (permalink)  
Antiguo 21/10/2014, 13:41
luvac
 
Fecha de Ingreso: febrero-2008
Mensajes: 8
Antigüedad: 16 años, 2 meses
Puntos: 0
Respuesta: realloc array 3 dimensiones char

Bueno tenias razon copiaba el puntero mas no la informacion,la maña que tengo por usar ides visuales,pero bueno el codigo quedo asi por si alguien le sirve:
Código:
if (record_count==0)
{
 rows=(char *** )calloc(1, sizeof(char ** )) ;
    for(int i = 0 ; i <1; i++ )
    {
        rows[i] = (char ** ) calloc(argc,sizeof(char * )) ;
        for ( int j = 0 ; j < argc ; j++ )
        {
            rows[i][j] = (char *) calloc(sizeof(argv[i]),sizeof(char));
        }
    }

}
else {
  if ((rows=(char *** )realloc(rows,(record_count+1)*sizeof(char ** )))==NULL)
        printf("Error");
    for(i =record_count ; i < record_count+1; i++ )
    {
       rows[i] = (char ** ) calloc(argc,sizeof(char * )) ;
        for (j = 0 ; j < argc ; j++ )
        {
           rows[i][j] = (char *) calloc(sizeof(argv[i]),sizeof(char));
        }
    }

}
Gracias eferion por hacerme ver mi error.