This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

for(N = List->Head;N;N = N->Succ)

struct NODE{
    struct NODE Succ;
    struct NODE Prev;
};

struct LIST{
    struct NODE *Head;
    struct NODE *Tail;
    int count;
};

struct LIST *List;
struct NODE *N;

......
for(N = List->Head;N;N = N->Succ)
{
    ......
}
Compiler C51 changed value of List->Head because of the side effect of N = N->Succ.What can I do?

Parents Reply Children
No data