cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

spectral
Adept II

&a->b is equal to &(a->n) ou (&a)->b

Hi,

 

I suspect that sometimes the following expression "&a->b" is evaluated as :

(&a)->b

 

... but it should be &(a->n) ? Right ?

0 Likes
3 Replies
nou
Exemplar

yes -> have higher priority than &

0 Likes

Thanks Nou,

So, my bug is somewhere else !

0 Likes

It is a good practice not to rely on C precedence rules (except the most obvious ones, such as * over +) and to use parentheses whenever there's a possibility of doubt.

0 Likes