Título: Problema con Pilas Publicado por: jaxoR en 5 Junio 2015, 19:50 pm Bueno, estoy haciendo un ejercicio para la facultad con pilas y secuencias (archivos de texto). El problema es que al pasar la pila a las funcionas para manejarla, me tira el siguiente error:
warning: passing argument 1 of 'pVacia' from incompatible pointer type [enabled by default]| note: expected 'struct TPila *' but argument is of type 'struct TPila **'| warning: passing argument 1 of 'pSacar' from incompatible pointer type [enabled by default]| note: expected 'struct TPila *' but argument is of type 'struct TPila **'| warning: passing argument 2 of 'pSacar' from incompatible pointer type [enabled by default]| note: expected 'char *' but argument is of type 'char **'| warning: passing argument 1 of 'pVacia' from incompatible pointer type [enabled by default]| note: expected 'struct TPila *' but argument is of type 'struct TPila **'| warning: passing argument 1 of 'sacarPila' from incompatible pointer type [enabled by default]| note: expected 'char *' but argument is of type 'char **'| warning: passing argument 3 of 'sacarPila' from incompatible pointer type [enabled by default]| note: expected 'struct TPila *' but argument is of type 'struct TPila **'| warning: passing argument 1 of 'pPoner' from incompatible pointer type [enabled by default]| note: expected 'struct TPila *' but argument is of type 'struct TPila **'| warning: passing argument 2 of 'pPoner' makes integer from pointer without a cast [enabled by default]| Acá dejo el code y el header: Código
Código
Título: Re: Problema con Pilas Publicado por: avesudra en 5 Junio 2015, 21:11 pm No estás pasando bien los parámetros a pSacar, pVacia y pPoner ya que reciben un puntero y le estás pasando un doble puntero al poner el ampersand, por ejemplo:
Código El código deberia quedar así: Código
|