zeion
- 455
- 1
Hi,
So I have a circular linked list; each element of the list has a int value and a next pointer to the next element. BUT. When I try to compare rather the NEXT element has a certain value, I always get a true return; how do I properly compare the structure values with an int?
I'm doing something like:
if (current->next->value == 3) {
printf("The next element has value 3");
}
But that always returns true rehardless; any help?
So I have a circular linked list; each element of the list has a int value and a next pointer to the next element. BUT. When I try to compare rather the NEXT element has a certain value, I always get a true return; how do I properly compare the structure values with an int?
I'm doing something like:
if (current->next->value == 3) {
printf("The next element has value 3");
}
But that always returns true rehardless; any help?