I thought I new C pretty well. Until today when I learnt C's && and || operators are short-circuiting. I've been needlessly writing nested if's for years.
Now I see in lloyddean's code he put up the in "Getting duplicate numbers" thread that he consistently uses the following code:
where "p" is pointer to a structure with a member called "_end".
I would have expected the following instead:
I thought these two were completely equivalent. But now I'm not sure. Are the exactly the same?
Now I see in lloyddean's code he put up the in "Getting duplicate numbers" thread that he consistently uses the following code:
Code:
(*p)._end
where "p" is pointer to a structure with a member called "_end".
I would have expected the following instead:
Code:
p->_end
I thought these two were completely equivalent. But now I'm not sure. Are the exactly the same?