Discussione: Problema C AIUTO PLS
View Single Post
Old 25-04-2002, 12:29   #1
Pettinato
Member
 
L'Avatar di Pettinato
 
Iscritto dal: Jun 2000
Città: Milano
Messaggi: 136
Problema C AIUTO PLS

Ciao a tutti

ho riscontrato un problema durante la compilazione in questa parte di programma:

int verifica(int s,PUNT **H,int *w){
NODO *q,*z;
PUNT *c;
for (q=p;q!=NULL;q=q->next)
for (z=q;z->k!=s || z->down!=NULL;z=z->down)
if(z->k==s){
*w=1;
if(*H==NULL){
*H=(PUNT*)malloc(sizeof(PUNT));
*H->next=NULL; //riga 54
*H->p=q;}//riga 55
else{
c=(PUNT*)malloc(sizeof(PUNT));
c->p=q;
c->next=H;
*H=c;}
return 1;}
else
return 0;}


Il compilatore mi scrive così:
STALA.c: In function `verifica':
STALA.c:54: request for member `next' in something not a structure or union
STALA.c:55: request for member `p' in something not a structure or union


La mia struttura è questa:

typedef struct punt {
NODO *p;
struct punt *next;
}PUNT;


Sembra che non veda questa struttura che sta in un file .h che ovviamente ho specificato con #include "STALA.h"

Ciao a tutti e grazie
__________________
athlon xp-m 2400Mhz asus a7n8x-x ati 9800 aiw@9800pro
Pettinato è offline   Rispondi citando il messaggio o parte di esso