struct my_struct
{
struct my_struct *next;
int data;
};
struct my_struct *root;
Then if I want to do something like find the struct in the linked list with the highest data value should I use my pointers like this?
struct my_struct *temp = head;
struct my_struct *highest = head;
for(I = 0; I<10; I++)
{
temp = temp->next;
}
So my main question is: should it be temp = temp->next; or should it be temp = address of temp->next, temp = &temp->next; or should it be temp = *temp->next; and the logic behind it would help me a lot.