Code:Hi all, Please clarify me the difference between (uchar) *p and (uchar * ) p Most of the time i got confused about this. Thanks in advance. Regards, Rajisankar.
Code:Hi all, Please clarify me the difference between (uchar) *p and (uchar * ) p Most of the time i got confused about this. Thanks in advance. Regards, Rajisankar.
(uchar)*p -> cast *p value to (uchar) type.
(uchar*)p -> cast p to pointer to uchar.
Don't use code tag unless it's code.
Hi,
(uchar)*p means unsigned char pointer.p points to unsigned char.
But (uchar *) p means?Could you explain me briefly?please.
thanks.
Regards,
Rajisankar.
Read them from left to right.
*p dereference the pointer, then the result is casted to uchar.
In (uchar*)p, the pointer type is casted to a uchar pointer.