Ver Mensaje Individual
  #2 (permalink)  
Antiguo 18/05/2015, 03:49
eferion
 
Fecha de Ingreso: octubre-2014
Ubicación: Madrid
Mensajes: 1.212
Antigüedad: 9 años, 7 meses
Puntos: 204
Respuesta: Segmentation fault 11, con listas enlazadas

Código C++:
Ver original
  1. ListaEnlazadaRef extraerFilaLiberarMatriz(matIntRef matriz, int nFila) {
  2.   ListaEnlazadaRef raiz = NULL;
  3.   for (i=0; i<(matriz->numCol); i++) {
  4.     // ...
  5.     aux = *raiz;
  6.            
  7.     if (aux == NULL)
  8.     {
  9.       *raiz = nuevo;
  10.     }
  11.     // ...
  12.   }
  13.   return raiz;
  14. }

"ListaEnlazadaRef" es un puntero... ¿dónde reservas memoria para dicho puntero? en ninguna parte. Te falta reservar memoria para este objeto

Un saludo