I am currently writing a program that reads in an index of words and searches through a large text file for every instance of that word. I have the tokenize and input working correctly, but I am currently having problems getting my linked list which will consist of the pages it is on to work correctly. I think what its doing is only showing me the last node.
Here are my structures:
Here is my portion of code for the linked list:
typedef struct stag
int pgno ; //page numbers
struct stag *next ; // pointer to next page No
NODE *link ;// pointer to linked list of pgno
Any advice would be appreciated.
if(bin >= 0)//bin is the result of my binsearch
p = new(NODE);
p->next = NULL;
p->pgno = pages;//pgno is page number
index.awn[bin].link = p;