P
picknicker187
hi,
the following while function(it´s supposed to find word synonyms out of a
list) always quits after running through the list in the inner loop once.
it´s like the aktuell = aktuell->next on the bottom would not be there.
can anyone tell me what the problem might be?
greetz,
bastian
int checksyn(Relations *head)
{
char rel = 'S';
Relations *aktuell = head;
Relations *aktuell2 = head;
while (aktuell != NULL)
{
if(aktuell->relType == rel)
{
while (aktuell2 != NULL)
{
if(aktuell2->relType == rel && aktuell2->word == aktuell->dest &&
aktuell->word == aktuell2->dest)
printf("match found for: %c %s %s\n",aktuell->relType, aktuell->word,
aktuell->dest);
else
printf("no match found for: %c %s %s\n", aktuell->relType, aktuell->word,
aktuell->dest);
aktuell2 = aktuell2->next;
}
}
aktuell = aktuell->next;
}
return 0;
}
the following while function(it´s supposed to find word synonyms out of a
list) always quits after running through the list in the inner loop once.
it´s like the aktuell = aktuell->next on the bottom would not be there.
can anyone tell me what the problem might be?
greetz,
bastian
int checksyn(Relations *head)
{
char rel = 'S';
Relations *aktuell = head;
Relations *aktuell2 = head;
while (aktuell != NULL)
{
if(aktuell->relType == rel)
{
while (aktuell2 != NULL)
{
if(aktuell2->relType == rel && aktuell2->word == aktuell->dest &&
aktuell->word == aktuell2->dest)
printf("match found for: %c %s %s\n",aktuell->relType, aktuell->word,
aktuell->dest);
else
printf("no match found for: %c %s %s\n", aktuell->relType, aktuell->word,
aktuell->dest);
aktuell2 = aktuell2->next;
}
}
aktuell = aktuell->next;
}
return 0;
}