LacosTTe Posted May 9, 2012 Report Share Posted May 9, 2012 (edited) está dando erro nessa linha aux->prox = p->topo;erro: assignment from incompatible pointer typealguém sabe porque?usando ubuntu 12.04 + codeblocksPS: no DEV C++ no windows 7, não da esse erro <_< #include <stdio.h> #include <stdlib.h> //#-----------------------------------------------------# typedef struct No { char info; struct no* prox; }no; typedef struct Pilha { no* topo; }pilha; //#-----------------------------------------------------# void PVazia() { pilha* p = (pilha*)malloc(sizeof(pilha)); p->topo = NULL; } //#-----------------------------------------------------# void empilhar(pilha* p,float v) { no* aux = (no*)malloc(sizeof(no)); aux->info = v; aux->prox = p->topo; p->topo = aux; } Edited May 9, 2012 by LacosTTe Quote Link to comment Share on other sites More sharing options...
Question
LacosTTe
está dando erro nessa linha aux->prox = p->topo;
erro: assignment from incompatible pointer type
alguém sabe porque?
usando ubuntu 12.04 + codeblocks
PS: no DEV C++ no windows 7, não da esse erro <_<
Edited by LacosTTeLink to comment
Share on other sites
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.