Structs Problem

Hello everyone...
I´ve got a problem that is bugging me for a while...
and how I´m not an experient C programer, I don´t know whats wrong with this...
anyone could help me?

well, I´m defining an structre such like this to implement a hash table:
1
2
3
4
5
6
7
8
typedef struct entry{
    int token;
    int indiceLex;
    entry *prox;
};


struct entry *pEnt[TAMANHO];


but I got a sintax error here:
entry *prox;
and I dont know the error...
anyone knows whats´s the problem with this?
entry is not defined until the struct is closed.

1
2
3
4
5
struct entry {
  int token;
  int indiceLex;
  struct entry* prox;
};

1
2
3
4
5
typedef struct entry{
    int token;
    int indiceLex;
    entry *prox;
}entry;


entry *prox;
thx ppl...
it solved the problem
^^
i´ve spent a long time trying to figure this out
=T
it seems that i have to learn a lot yet
=D
Topic archived. No new replies allowed.